/* RERA Cases Styling */
.rera-cases-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Custom cursor styles matching the site theme */
.rera-cases-container input:not([type="file"]):not([type="radio"]):not([type="checkbox"]),
.rera-cases-container textarea {
    cursor: url(../dashboard/images/icon/type.svg), auto !important;
    caret-color: #FF6725 !important;
}

.rera-cases-container select,
.rera-cases-container a,
.rera-cases-container button,
.rera-cases-container .case-card:hover {
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
}

/* Header Section */
.rera-cases-header {
    background: linear-gradient(135deg, #FF6725 0%, #e55a20 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 103, 37, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-icon {
    font-size: 48px;
    opacity: 0.9;
    min-width: 60px;
}

.header-text h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.header-text p {
    font-size: 16px;
    margin: 0 0 15px 0;
    opacity: 0.9;
    line-height: 1.5;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.stat-item i {
    font-size: 16px;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.search-input-group {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF6725;
    box-shadow: 0 0 0 3px rgba(255, 103, 37, 0.1);
}

.search-btn {
    background: #FF6725;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: all 0.3s ease;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #e55a20;
    transform: translateY(-1px);
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #FF6725;
}

.clear-filters-btn {
    color: #dc3545;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-filters-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Results Section */
.results-section {
    margin-bottom: 40px;
}

.results-header {
    margin-bottom: 20px;
}

.results-count {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.case-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.case-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.case-number {
    font-weight: 700;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.case-number i {
    color: #FF6725;
}

.case-date {
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-content {
    padding: 20px;
}

.case-parties {
    margin-bottom: 15px;
}

.complainant, .respondent {
    margin-bottom: 12px;
}

.complainant label, .respondent label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.complainant p, .respondent p, .project-description p {
    margin: 0;
    color: #495057;
    line-height: 1.4;
    font-size: 14px;
}

.project-description {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.project-description label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.case-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e9ecef;
}

.pdf-link, .details-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    border: none;
}

.pdf-link {
    background: #dc3545;
    color: white;
}

.pdf-link:hover {
    background: #c82333;
    color: white;
    transform: translateY(-1px);
}

.details-btn {
    background: #6c757d;
    color: white;
}

.details-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.no-results-icon {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #495057;
    margin-bottom: 10px;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #495057;
    font-size: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rera-cases-container {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .header-icon {
        min-width: auto;
    }

    .header-text h1 {
        font-size: 24px;
    }

    .search-row {
        flex-direction: column;
        gap: 15px;
    }

    .search-input-group {
        min-width: auto;
    }

    .search-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cases-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .case-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .case-actions {
        flex-direction: column;
        gap: 8px;
    }

    .pdf-link, .details-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-filter-section {
        padding: 20px 15px;
    }

    .case-content {
        padding: 15px;
    }

    .case-actions {
        padding: 15px;
    }
}

/* Case Detail Show Page Styles */
.case-detail-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.case-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.case-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-meta-item i {
    color: #ff6725;
    font-size: 18px;
    min-width: 20px;
}

.case-meta-item div label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.case-meta-item div span {
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.case-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.case-type-badge.tsrera {
    background: #1565c0;
}

.case-type-badge.smb {
    background: #6a1b9a;
}

.case-type-badge.adjudicating {
    background: #2e7d32;
}

.case-date {
    color: #6c757d;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-download-pdf {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
}

.btn-download-pdf:hover {
    background: #c82333;
    color: white;
    transform: translateY(-1px);
}

.btn-view-case {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
}

.btn-view-case:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-1px);
}

.pdf-viewer-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    overflow: hidden;
}

.pdf-viewer-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pdf-viewer-header h4 {
    margin: 0;
    color: #495057;
    font-size: 20px;
}

.pdf-viewer-header div {
    display: flex;
    gap: 10px;
}

/* Prevent FlipBook from taking over the page */
#rera-pdf-container .fb-3d-page-wrapper {
    position: relative !important;
    z-index: 1 !important;
}

#rera-pdf-container .fb-overlay {
    position: absolute !important;
    z-index: 2 !important;
}

/* Party information styling */
.party-info {
    background: linear-gradient(135deg, #fff8f3, #fff);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #fff0e6;
}

.party-info label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.party-name {
    font-size: 15px;
    line-height: 1.6;
    color: #495057;
}

.project-info {
    background: linear-gradient(135deg, #fff8f3, #fff0e6);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #ffe8d9;
}

/* Related cases styling */
.case-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.case-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.case-card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.case-card-header h5 {
    margin: 0;
    color: #495057;
}

.case-card-body {
    padding: 20px;
}

/* Responsive design for case detail page */
@media (max-width: 768px) {
    .case-detail-header {
        padding: 20px;
    }

    .case-meta-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pdf-viewer-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .pdf-viewer-header div {
        justify-content: center;
    }

    .case-card-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Cases Header Styles for Category Pages */
.cases-header {
    background: linear-gradient(135deg, #FF6725 0%, #e55a20 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius:20px;
}

.cases-header-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cases-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-icon-wrapper {
    background: rgba(255, 255, 255, 0.15);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.header-icon-wrapper i {
    font-size: 36px;
    color: white;
}

.cases-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: white;
}

.cases-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-card i {
    font-size: 28px;
    margin-bottom: 15px;
    display: block;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Results Info */
.results-info {
    background: #f8f9fa;
    padding: 15px 25px;
    border-top: 1px solid #e9ecef;
    font-size: 14px;
    color: #6c757d;
}

.results-info .fw-500 {
    font-weight: 500;
    color: #495057;
}

/* Case Card for List View */
.case-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.case-card-header {
    background: #f8f9fa;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.case-card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
}

.case-card-header h5 i {
    color: #FF6725;
    margin-right: 8px;
}

.case-type-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.case-type-badge.tsrera {
    background: #1565c0;
    color: white;
}

.case-type-badge.smb {
    background: #6a1b9a;
    color: white;
}

.case-type-badge.adjudicating {
    background: #2e7d32;
    color: white;
}

.case-date {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.case-card-body {
    padding: 25px;
}

.case-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.party-info label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.party-name {
    color: #495057;
    font-weight: 500;
    line-height: 1.4;
}

.project-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.project-info i {
    color: #FF6725;
    margin-top: 2px;
    flex-shrink: 0;
}

.project-info p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
    font-size: 0.9rem;
}

.case-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.btn-view-case {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: url(../dashboard/images/icon/pointer.svg), pointer !important;
    border: none;
    background: #FF6725;
    color: white;
}

.btn-view-case:hover {
    background: #e55a20;
    color: white;
    transform: translateY(-1px);
}

.btn-view-case i {
    font-size: 0.75rem;
}

/* No Results Styling */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.no-results-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 25px;
}

.no-results h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Map Container Styles */
.contact-map-banner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gmap_canvas {
    position: relative;
}

.gmap_iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
}

/* Map responsive design */
@media (max-width: 768px) {
    .contact-map-banner {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .contact-map-banner {
        height: 250px !important;
    }
}

/* Map loading placeholder */
.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
    font-size: 14px;
}

.map-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments for case cards */
@media (max-width: 768px) {
    .cases-header {
        padding: 40px 0;
    }

    .cases-header h1 {
        font-size: 2rem;
    }

    .cases-header p {
        font-size: 1rem;
    }

    .header-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .header-icon-wrapper i {
        font-size: 28px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .case-card-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .case-parties {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .case-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .case-actions > div {
        display: flex;
        gap: 10px;
    }

    .btn-view-case {
        flex: 1;
        justify-content: center;
    }

    /* Mobile map adjustments */
    .contact-map-banner {
        margin: 0 -15px;
        border-radius: 0;
    }
    
    .gmap_iframe {
        border-radius: 0 !important;
    }
}
