/* ================================================
   Appointment Module Full-Screen Styles
   ================================================ */

/* Import necessary styles from chat_sidebar.css for appointment module */

/* Section Titles */
.module-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.module-section .section-title i {
    color: var(--primary-color);
    font-size: 18px;
}

/* Services List */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.service-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.15);
}

.service-item.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.service-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 24px;
    flex-shrink: 0;
}

.service-info {
    flex: 1;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.service-description {
    font-size: 13px;
    color: var(--secondary-text);
    line-height: 1.4;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.service-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--secondary-text);
}

.service-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Experts List */
.experts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    padding: 8px 0;
}

/* Professional Info Card */
.professional-info-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.professional-info-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.15);
}

.professional-info-card.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.professional-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.professional-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #28a745;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
    font-size: 10px;
}

.professional-details {
    flex: 1;
}

.professional-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.professional-title {
    font-size: 13px;
    color: var(--secondary-text);
    margin-bottom: 8px;
}

.expert-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--secondary-text);
}

.expert-meta i {
    margin-right: 4px;
}

.action-icon {
    color: var(--primary-color);
    font-size: 20px;
}

/* Date Selector */
.appointment-section {
    margin-bottom: 24px;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.date-nav-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.date-nav-btn:hover {
    background: var(--card-hover-bg);
    border-color: var(--primary-color);
}

.date-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.date-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    flex: 1;
    padding: 4px;
    scrollbar-width: thin;
}

.date-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.date-item:hover {
    border-color: var(--primary-color);
}

.date-item.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.date-day {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.date-number {
    font-size: 20px;
    font-weight: 700;
}

.date-month {
    font-size: 11px;
    opacity: 0.8;
}

/* Time Grid */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 12px 0;
}

.time-slot {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.time-slot.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--card-hover-bg);
}

.time-slot.unavailable:hover {
    border-color: var(--border-color);
    background: var(--card-hover-bg);
}

/* Appointment Summary */
.appointment-summary {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.summary-card {
    background: var(--background);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-text);
}

.summary-label i {
    color: var(--primary-color);
}

.summary-value {
    font-weight: 600;
    color: var(--text-color);
}

.confirm-appointment-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.confirm-appointment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.confirm-appointment-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Appointments List */
.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.appointment-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.appointment-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.appointment-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.appointment-date-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-color);
}

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

.appointment-status.upcoming {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.appointment-status.completed {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.appointment-status.cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.appointment-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.appointment-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-text);
}

.appointment-detail i {
    color: var(--primary-color);
    width: 20px;
}

.appointment-item-footer {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.appointment-action-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.appointment-action-btn.primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.appointment-action-btn.primary:hover {
    opacity: 0.9;
}

.appointment-action-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.appointment-action-btn.secondary:hover {
    background: var(--card-hover-bg);
    border-color: var(--primary-color);
}

/* Expert Selection Wrapper */
.expert-selection-wrapper {
    margin-bottom: 24px;
}

/* Expert Dropdown List */
.expert-dropdown-list {
    margin-top: 12px;
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--background);
    padding: 16px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.expert-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.expert-dropdown-list::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.expert-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.expert-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .services-list,
    .experts-list {
        grid-template-columns: 1fr;
    }

    .time-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .date-list {
        gap: 8px;
    }

    .date-item {
        min-width: 70px;
        padding: 10px 12px;
    }
}

/* Loading State */
.module-section .spinner-border {
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-text);
}

.empty-state i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--secondary-text);
}

/* ================================================
   Overlay Styles
   ================================================ */

/* Result Overlay */
#appointmentResultOverlay {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#appointmentResultOverlay.active,
#cancelConfirmationOverlay.active,
#loginPromptOverlay.active {
    display: flex !important;
}

/* Cancel Confirmation Overlay */
#cancelConfirmationOverlay {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#cancelConfirmationOverlay .btn {
    min-width: 140px;
    transition: all 0.2s ease;
}

#cancelConfirmationOverlay .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Login Prompt Overlay */
#loginPromptOverlay {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

#loginPromptOverlay .btn {
    min-width: 120px;
    transition: all 0.2s ease;
}

#loginPromptOverlay .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Animation for scale in */
@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Fade in animation for overlays */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
