/* Component-specific Styles */

/* Header Components */
.page-header {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ER Wait Time Components */
.wait-time-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.wait-time-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.wait-time-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.wait-time-label {
    text-align: center;
    color: var(--secondary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wait-time-status {
    text-align: center;
    margin-top: 1rem;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-low {
    background: var(--gradient-success);
    color: white;
}

.status-medium {
    background: var(--gradient-warning);
    color: white;
}

.status-high {
    background: var(--gradient-warning);
    color: white;
}

.status-critical {
    background: var(--gradient-warning);
    color: white;
}

/* Hospital Components */
.hospital-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.hospital-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hospital-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
}

.hospital-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hospital-address {
    opacity: 0.9;
    font-size: 0.95rem;
}

.hospital-body {
    padding: 1.5rem;
}

.hospital-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.hospital-distance {
    color: var(--secondary-color);
    font-weight: 500;
}

.hospital-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Chat Components */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-lg);
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-bubble.user {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.bot {
    background: white;
    color: var(--dark-color);
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 0.25rem;
}

.chat-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e9ecef;
}

/* Registration Components */
.registration-form {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

/* Records Components */
.records-table {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.records-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.records-body {
    padding: 0;
}

.record-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.record-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.record-item:last-child {
    border-bottom: none;
}

.record-date {
    color: var(--secondary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.record-type {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.record-description {
    color: var(--dark-color);
    font-size: 0.95rem;
}

/* Directions Components */
.directions-container {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.directions-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.directions-content {
    padding: 1.5rem;
}

.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.directions-list {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.direction-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.direction-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    background: var(--gradient-primary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-instruction {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.step-distance {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Filter Components */
.filter-section {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.filter-title i {
    margin-right: 0.5rem;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Search Components */
.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    padding-left: 3rem;
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 2;
}

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

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--secondary-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .hospital-actions {
        flex-direction: column;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-container {
        height: 400px;
    }
    
    .map-container {
        height: 300px;
    }
}
