/**
 * HemoConnect Public Styles
 * Beautiful, responsive frontend styling
 */

/* ===== Variables ===== */
:root {
    --hc-primary: #1E88E5;
    --hc-primary-dark: #0D47A1;
    --hc-success: #2E7D32;
    --hc-danger: #D32F2F;
    --hc-warning: #FF9800;
    --hc-info: #0288D1;
    --hc-gray: #757575;
    --hc-light-gray: #F5F7FA;
    --hc-border: #E0E0E0;
    --hc-text: #333333;
    --hc-white: #FFFFFF;
}

/* ===== Global Styles ===== */
.hc-clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.hc-text-center { text-align: center; }
.hc-text-left { text-align: left; }
.hc-text-right { text-align: right; }

.hc-mt-1 { margin-top: 10px; }
.hc-mt-2 { margin-top: 20px; }
.hc-mt-3 { margin-top: 30px; }
.hc-mb-1 { margin-bottom: 10px; }
.hc-mb-2 { margin-bottom: 20px; }
.hc-mb-3 { margin-bottom: 30px; }

/* ===== Registration Form ===== */
.hc-registration-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hc-registration-card {
    background: var(--hc-white);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid var(--hc-border);
}

.hc-registration-header {
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-dark));
    padding: 40px;
    text-align: center;
    color: white;
}

.hc-registration-header h2 {
    color: white;
    font-size: 2rem;
    margin: 0 0 10px;
}

.hc-registration-header .hc-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0;
}

.hc-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.hc-icon-wrapper .hc-icon {
    width: 50px;
    height: 50px;
    filter: brightness(0) invert(1);
}

/* Progress Steps */
.hc-progress-steps {
    display: flex;
    padding: 30px 40px;
    background: var(--hc-light-gray);
    border-bottom: 1px solid var(--hc-border);
}

.hc-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.hc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 20px;
    width: 30px;
    height: 2px;
    background: var(--hc-border);
}

.hc-step.active .hc-step-number {
    background: var(--hc-primary);
    color: white;
    border-color: var(--hc-primary);
}

.hc-step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--hc-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--hc-gray);
}

.hc-step-label {
    font-weight: 500;
    color: var(--hc-text);
}

/* Form Styles */
.hc-registration-form {
    padding: 40px;
}

.hc-form-step {
    display: none;
}

.hc-form-step.active {
    display: block;
}

.hc-step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hc-text);
    margin: 0 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--hc-light-gray);
}

.hc-form-group {
    margin-bottom: 25px;
}

.hc-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.hc-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--hc-border);
    border-radius: 12px;
    transition: border-color 0.3s;
}

.hc-form-control:focus {
    outline: none;
    border-color: var(--hc-primary);
}

.hc-form-control.error {
    border-color: var(--hc-danger);
}

.hc-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.hc-col {
    flex: 1;
}

.hc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.hc-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.hc-field-note {
    display: block;
    font-size: 0.85rem;
    color: var(--hc-gray);
    margin-top: 5px;
}

.hc-required {
    color: var(--hc-danger);
    margin-left: 3px;
}

/* Form Navigation */
.hc-form-navigation {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--hc-light-gray);
}

.hc-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.hc-btn-primary {
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-dark));
    color: white;
}

.hc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30,136,229,0.3);
    color: white;
}

.hc-btn-success {
    background: var(--hc-success);
    color: white;
}

.hc-btn-danger {
    background: var(--hc-danger);
    color: white;
}

.hc-btn-next {
    background: var(--hc-primary);
    color: white;
    margin-left: auto;
}

.hc-btn-prev {
    background: var(--hc-light-gray);
    color: var(--hc-text);
}

.hc-btn-prev:hover {
    background: var(--hc-border);
}

.hc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Medical Disclaimer */
.hc-medical-disclaimer {
    background: #FFF3E0;
    border-left: 4px solid var(--hc-warning);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hc-medical-disclaimer .dashicons {
    color: var(--hc-warning);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.hc-medical-disclaimer p {
    margin: 0;
    color: #F57C00;
}

/* Consent Box */
.hc-consent-box {
    background: var(--hc-light-gray);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.hc-disclaimer {
    background: #FFEBEE;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    color: var(--hc-danger);
    margin-top: 20px;
}

/* Login Link */
.hc-login-link {
    text-align: center;
    padding: 20px;
    background: var(--hc-light-gray);
    border-top: 1px solid var(--hc-border);
}

.hc-login-link a {
    color: var(--hc-primary);
    text-decoration: none;
    font-weight: 500;
}

.hc-login-link a:hover {
    text-decoration: underline;
}

/* ===== Donor Portal ===== */
.hc-portal-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hc-portal-header {
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-dark));
    border-radius: 20px 20px 0 0;
    padding: 40px;
    color: white;
}

.hc-portal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hc-portal-welcome h1 {
    color: white;
    font-size: 2rem;
    margin: 0 0 5px;
}

.hc-portal-subtitle {
    color: rgba(255,255,255,0.9);
    margin: 0;
}

.hc-portal-status {
    display: flex;
    gap: 20px;
    align-items: center;
}

.hc-status-badge {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hc-status-badge.pending {
    background: var(--hc-warning);
    color: white;
}

.hc-status-badge.approved {
    background: var(--hc-success);
    color: white;
}

.hc-status-badge.rejected {
    background: var(--hc-danger);
    color: white;
}

.hc-blood-type {
    background: rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.hc-blood-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.hc-blood-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Portal Navigation */
.hc-portal-nav {
    background: white;
    border-left: 1px solid var(--hc-border);
    border-right: 1px solid var(--hc-border);
    display: flex;
    padding: 0 20px;
}

.hc-nav-item {
    padding: 20px 25px;
    color: var(--hc-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.hc-nav-item:hover {
    color: var(--hc-primary);
    background: var(--hc-light-gray);
}

.hc-nav-item.active {
    color: var(--hc-primary);
    border-bottom-color: var(--hc-primary);
}

.hc-nav-item.logout {
    margin-left: auto;
    color: var(--hc-danger);
}

.hc-nav-item.logout:hover {
    background: #FFEBEE;
}

/* Portal Content */
.hc-portal-content {
    background: white;
    border: 1px solid var(--hc-border);
    border-top: none;
    border-radius: 0 0 20px 20px;
    padding: 40px;
}

/* Dashboard Cards */
.hc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.hc-dashboard-card {
    background: var(--hc-light-gray);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
}

.hc-dashboard-card:hover {
    transform: translateY(-5px);
}

.hc-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-dark));
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.hc-card-icon .dashicons {
    color: white;
    font-size: 30px;
    width: 30px;
    height: 30px;
}

.hc-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-card-label {
    color: var(--hc-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Eligibility Card */
.hc-eligibility-card {
    background: linear-gradient(135deg, var(--hc-primary), var(--hc-primary-dark));
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.hc-eligibility-card.eligible {
    background: linear-gradient(135deg, var(--hc-success), #1B5E20);
}

.hc-eligibility-card.not-eligible {
    background: linear-gradient(135deg, var(--hc-warning), #F57C00);
}

.hc-eligibility-title {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.hc-eligibility-date {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hc-eligibility-note {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Profile Sections */
.hc-profile-section {
    background: var(--hc-light-gray);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.hc-profile-section h3 {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--hc-border);
}

.hc-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hc-profile-field {
    background: white;
    padding: 15px;
    border-radius: 12px;
}

.hc-field-label {
    font-size: 0.85rem;
    color: var(--hc-gray);
    margin-bottom: 5px;
}

.hc-field-value {
    font-size: 1.1rem;
    font-weight: 500;
}

/* History Table */
.hc-history-table {
    width: 100%;
    border-collapse: collapse;
}

.hc-history-table th {
    text-align: left;
    padding: 15px;
    background: var(--hc-light-gray);
    color: var(--hc-text);
    font-weight: 600;
}

.hc-history-table td {
    padding: 15px;
    border-bottom: 1px solid var(--hc-light-gray);
}

.hc-history-table tr:hover td {
    background: var(--hc-light-gray);
}

/* Toggle Switch */
.hc-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.hc-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.hc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .hc-toggle-slider {
    background-color: var(--hc-primary);
}

input:checked + .hc-toggle-slider:before {
    transform: translateX(26px);
}

/* ===== Emergency Ticker ===== */
.hc-emergency-ticker {
    background: linear-gradient(135deg, var(--hc-danger), #B71C1C);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

.hc-ticker-content {
    display: flex;
    animation: hc-ticker 30s linear infinite;
    white-space: nowrap;
}

.hc-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.3);
}

.hc-ticker-item:last-child {
    border-right: none;
}

.hc-ticker-emergency {
    background: white;
    color: var(--hc-danger);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

@keyframes hc-ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== Blood Stock Widget ===== */
.hc-stock-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--hc-border);
}

.hc-stock-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.hc-stock-item {
    text-align: center;
    padding: 10px;
    background: var(--hc-light-gray);
    border-radius: 8px;
}

.hc-stock-blood {
    font-weight: 700;
    font-size: 1.1rem;
}

.hc-stock-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hc-primary);
}

.hc-stock-count.critical {
    color: var(--hc-danger);
}

.hc-stock-count.low {
    color: var(--hc-warning);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hc-row {
        flex-direction: column;
        gap: 0;
    }
    
    .hc-progress-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .hc-step:not(:last-child)::after {
        display: none;
    }
    
    .hc-portal-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .hc-portal-nav {
        flex-wrap: wrap;
    }
    
    .hc-nav-item.logout {
        margin-left: 0;
    }
    
    .hc-profile-grid {
        grid-template-columns: 1fr;
    }
    
    .hc-registration-header,
    .hc-registration-form {
        padding: 20px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .hc-portal-nav,
    .hc-btn,
    .hc-login-link {
        display: none;
    }
    
    .hc-portal-content {
        border: none;
        padding: 0;
    }
    
    .hc-dashboard-card {
        break-inside: avoid;
    }
}