/**
 * File: css/portal.min.css
 * Styling for the Patient Reports Portal page
 */

.portal-page-main {
    background-color: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #333333;
}

/* 1. Hero Section */
.portal-hero {
    position: relative;
    padding: 7rem 0 9rem 0;
    margin-top: 120px; /* Push hero down below fixed top bar & navbar */
    background: url('../assets/images/hospital3-scaled.jpeg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(6, 26, 53, 0.95) 0%, rgba(11, 34, 64, 0.75) 50%, rgba(6, 26, 53, 0.95) 100%);
    z-index: 1;
}

.portal-hero-container {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.hero-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 3.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(6, 26, 53, 0.4);
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 650px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(6, 26, 53, 0.3);
}

/* 2. Search Card */
.portal-search-card-wrapper {
    width: 100%;
    max-width: 520px;
}

.portal-search-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(6, 26, 53, 0.25);
    border: 1px solid rgba(11, 34, 64, 0.05);
    text-align: left;
    box-sizing: border-box;
}

.card-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0 0 1.75rem 0;
    border-bottom: 2px solid rgba(0, 128, 128, 0.08);
    padding-bottom: 0.75rem;
}

.portal-search-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 2rem;
}

.portal-search-form .form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #777777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mr-input-field {
    width: 100%;
    padding: 1.05rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0b2240;
    border: 2px solid #dcdcdc;
    border-radius: 12px;
    background-color: #fafafa;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    letter-spacing: 1px;
}

.mr-input-field::placeholder {
    font-weight: 400;
    letter-spacing: 0px;
    color: #999999;
}

.mr-input-field:focus {
    border-color: #008080;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.08);
}

.portal-submit-btn {
    width: 100%;
    padding: 1rem;
    background: #008080;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 128, 128, 0.2);
}

.portal-submit-btn:hover {
    background: #0b2240;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(11, 34, 64, 0.25);
}

/* 3. Portal Container & Results Section */
.portal-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.portal-results-section {
    padding: 6rem 0;
    background: #f4f9fa; /* Light teal tint */
    min-height: 400px;
}

/* Dashboard Card */
.portal-dashboard-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(6, 26, 53, 0.04);
    border: 1px solid rgba(11, 34, 64, 0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.dashboard-header {
    background: #0b2240; /* Navy Blue header matching brand logo */
    padding: 2.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid rgba(0, 128, 128, 0.2);
}

.patient-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.meta-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.8px;
}

.patient-name {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.patient-mr {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #00e5ff; /* Cyan color */
    margin: 0;
    letter-spacing: 1px;
}

.dashboard-body {
    padding: 3rem;
}

.available-reports-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0 0 2rem 0;
}

/* Report Group Containers */
.report-group-container {
    margin-bottom: 2.5rem;
}

.report-group-container:last-child {
    margin-bottom: 0;
}

.report-group-header {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1.5px solid rgba(11, 34, 64, 0.08);
}

.no-reports-alert {
    font-size: 0.95rem;
    color: #777777;
    margin: 0;
    padding: 1rem 0;
    font-style: italic;
}

/* Report card list rows */
.report-row-card {
    background: #ffffff;
    border: 1px solid rgba(11, 34, 64, 0.06);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(11, 34, 64, 0.01);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
}

.report-row-card:last-child {
    margin-bottom: 0;
}

.report-row-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(11, 34, 64, 0.06);
    border-color: rgba(0, 128, 128, 0.15);
}

.report-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.report-name {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0;
}

.report-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666666;
}

.report-actions {
    display: flex;
    gap: 0.75rem;
}

.report-action-btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.report-action-btn.btn-view {
    background: transparent;
    color: #008080 !important;
    border: 1.5px solid #008080;
}

.report-action-btn.btn-view:hover {
    background: #008080;
    color: #ffffff !important;
}

.report-action-btn.btn-download {
    background: #008080;
    color: #ffffff !important;
    border: 1.5px solid transparent;
}

.report-action-btn.btn-download:hover {
    background: #0b2240;
}

/* Empty State / Not Found Card */
.portal-empty-card {
    text-align: center;
    max-width: 550px;
    margin: 0 auto;
    padding: 3.5rem 2.5rem;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(6, 26, 53, 0.04);
    border: 1px solid rgba(11, 34, 64, 0.05);
    box-sizing: border-box;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.empty-title {
    font-family: 'Poppins', -apple-system, sans-serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #0b2240;
    margin: 0 0 0.75rem 0;
}

.empty-desc {
    font-size: 0.95rem;
    color: #666666;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.empty-btn {
    padding: 0.8rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.empty-btn.btn-primary {
    background: #c92c2c; /* Alert/reception call icon color red */
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(201, 44, 44, 0.2);
}

.empty-btn.btn-primary:hover {
    background: #b02424;
}

.empty-btn.btn-secondary {
    background: #f0f0f0;
    color: #333333;
}

.empty-btn.btn-secondary:hover {
    background: #e0e0e0;
}

/* Animations */
.fade-up-reveal {
    animation: fadeUpReveal 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes fadeUpReveal {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Queries */
@media (max-width: 992px) {
    .portal-hero {
        margin-top: 110px;
        padding: 5rem 0 7rem 0;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .dashboard-header {
        padding: 2rem;
    }
    .dashboard-body {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .report-row-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem;
    }
    .report-actions {
        width: 100%;
    }
    .report-action-btn {
        flex-grow: 1;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .portal-hero {
        margin-top: 100px;
        padding: 4rem 0 6rem 0;
    }
    .hero-title {
        font-size: 2.15rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    .portal-search-card {
        padding: 1.75rem;
    }
    .empty-actions {
        flex-direction: column;
        width: 100%;
    }
    .empty-btn {
        width: 100%;
        text-align: center;
    }
}
