/**
 * Patient Views Common Styles
 * الأنماط المشتركة لصفحات المريض
 * 
 * This file contains common styles for all patient views.
 * يحتوي هذا الملف على الأنماط المشتركة لجميع صفحات المريض.
 * 
 * @author Mostafa Alamir
 * @version 2.1.0
 * @since 2024
 */

/* Global box-sizing fix */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Baby Blue and Pink Color Variables */
:root {
    --baby-blue: #4A90E2;
    --baby-pink: #E91E63;
    --light-blue: #E3F2FD;
    --light-pink: #FCE4EC;
    --dark-blue: #1976D2;
    --dark-pink: #C2185B;
    --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #E91E63 100%);
    --gradient-secondary: linear-gradient(135deg, #F8FBFF 0%, #FFEEF3 100%);
}

/* Base Styles */
body {
    font-family: 'Cairo', sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    color: #2C3E50;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

/* Main Content */
.main-content {
    padding: 20px;
    background: #F8FAFC;
    border-radius: 15px;
    margin: 0 auto;
    max-width: 1200px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}

/* Page Headers with gradient text */
.main-content h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Navigation */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    margin-bottom: 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Container wrapper for centering content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Remove default Bootstrap container margins */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure no extra spacing at top */
.container.main-content {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    transition: transform 0.3s ease;
    background: white;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.25);
}

.card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 20px;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 20px;
}

/* Dashboard Specific Cards */
.welcome-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(74, 144, 226, 0.4);
    overflow: hidden;
    position: relative;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-card {
    background: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card:nth-child(1) .icon {
    color: var(--baby-blue);
}

.stat-card:nth-child(2) .icon {
    color: var(--baby-pink);
}

.stat-card:nth-child(3) .icon {
    color: var(--baby-blue);
}

.stat-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-card .number {
    color: var(--dark-blue);
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .label {
    color: #34495E;
    font-weight: 600;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.3);
}

.action-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.25);
}

.action-btn {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--dark-pink) 100%);
}

.btn-outline-primary {
    border-color: var(--baby-blue);
    color: var(--baby-blue);
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--baby-blue);
    border-color: var(--baby-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(74, 144, 226, 0.4);
}

/* Form Controls */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--baby-blue);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-label {
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 8px;
}

/* Login/Register Page Styles */
.login-container, .register-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.25);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin: 20px auto;
}

.login-header, .register-header {
    background: var(--gradient-primary);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header .clinic-logo, .register-header .clinic-logo {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.login-header h2, .register-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
}

.login-header p, .register-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.login-body, .register-body {
    padding: 40px 30px;
}

.form-floating {
    margin-bottom: 20px;
}

.form-floating input {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-floating input:focus {
    border-color: var(--baby-blue);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-floating label {
    padding: 15px;
    color: #6c757d;
}

.btn-login, .btn-register {
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-login:hover, .btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(74, 144, 226, 0.4);
}

.btn-register {
    background: transparent;
    border: 2px solid var(--baby-blue);
    color: var(--baby-blue);
}

.btn-register:hover {
    background: var(--baby-blue);
    color: white;
}

.login-footer, .register-footer {
    text-align: center;
    padding: 20px 30px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.login-footer a, .register-footer a {
    color: var(--baby-blue);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover, .register-footer a:hover {
    text-decoration: underline;
    color: var(--dark-blue);
}

/* Appointment Styles */
.appointment-item {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.appointment-item:hover {
    border-color: var(--baby-blue);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.appointment-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: var(--light-blue);
    color: var(--dark-blue);
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-no_show {
    background: #f8d7da;
    color: #721c24;
}

.appointment-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.type-in_clinic {
    background: var(--light-blue);
    color: var(--dark-blue);
}

.type-online {
    background: var(--light-pink);
    color: var(--dark-pink);
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #2C3E50;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    color: var(--baby-blue);
}

/* Contact Info Items */
.contact-info-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    border-color: var(--baby-blue);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.2);
}

.contact-info-item i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.contact-info-content h6 {
    margin-bottom: 5px;
    color: #2C3E50;
    font-weight: 600;
}

.contact-info-content p {
    margin-bottom: 0;
    color: #34495E;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .main-content {
        padding: 15px;
        margin: 0 10px;
        border-radius: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }
    
    .container, .container-fluid {
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
    }
    
    .stat-card .icon {
        font-size: 1.5rem;
    }
    
    .stat-card .number {
        font-size: 2rem !important;
    }
    
    .action-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .card {
        margin-bottom: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-card {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .login-container, .register-container {
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }
    
    .login-header, .login-body, .register-header, .register-body {
        padding: 30px 20px;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-md-4, .col-md-6, .col-md-8, .col-lg-4, .col-lg-8, .col-sm-6, .col-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 10px;
        margin: 0 5px;
        width: calc(100% - 10px);
        border-radius: 5px;
    }
    
    .container, .container-fluid {
        padding: 0 5px;
    }
    
    .col-md-4, .col-md-6, .col-md-8, .col-lg-4, .col-lg-8, .col-sm-6, .col-12 {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .card {
        margin-bottom: 10px;
    }
    
    .welcome-card {
        padding: 15px;
    }
    
    .stat-card .number {
        font-size: 1.5rem !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--baby-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue);
}
