/* ===================================
   Enhanced Chat Components Styling
   Additional styles for new features
   =================================== */

/* Service Selection Grid */
.service-selection {
    padding: 15px;
}

.service-selection h4 {
    color: #17a2b8;
    margin-bottom: 15px;
    font-size: 16px;
}

.service-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
}

.service-card-mini {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.service-card-mini:hover {
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.service-icon-large {
    font-size: 32px;
    margin-bottom: 8px;
}

.service-info h4 {
    font-size: 13px;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.service-price {
    font-size: 11px;
    color: #10b981;
    margin-bottom: 8px;
    font-weight: 600;
}

.service-select-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    font-weight: 600;
}

.service-select-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.4);
}

/* Booking Wizard */
.booking-wizard-start,
.booking-wizard-step {
    padding: 15px;
}

.booking-wizard-start h4,
.booking-wizard-step h4 {
    color: #17a2b8;
    margin-bottom: 10px;
    font-size: 16px;
}

.price-info {
    color: #10b981;
    font-weight: 600;
    margin: 10px 0;
}

.wizard-progress {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #374151;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #17a2b8, #10b981);
    transition: width 0.3s ease;
}

.wizard-progress p {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

.wizard-question {
    color: #e5e7eb;
    font-size: 15px;
    margin: 15px 0 8px 0;
}

.wizard-hint {
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
}

/* Booking Success */
.booking-success {
    padding: 20px;
    text-align: center;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.booking-success h4 {
    color: #10b981;
    margin-bottom: 15px;
    font-size: 18px;
}

.order-summary {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    text-align: left;
}

.order-summary p {
    color: #e5e7eb;
    font-size: 13px;
    margin: 8px 0;
}

.order-summary strong {
    color: #17a2b8;
}

.success-note {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 15px;
}

/* Order History */
.order-history {
    padding: 15px;
}

.order-history h4 {
    color: #17a2b8;
    margin-bottom: 15px;
    font-size: 16px;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
}

.order-card {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s;
}

.order-card:hover {
    border-color: #17a2b8;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.2);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #374151;
}

.order-number {
    font-weight: 600;
    color: #17a2b8;
    font-size: 13px;
}

.order-status {
    font-size: 11px;
    color: #9ca3af;
    background-color: #374151;
    padding: 3px 8px;
    border-radius: 12px;
}

.order-body {
    margin-bottom: 10px;
}

.order-body p {
    color: #e5e7eb;
    font-size: 12px;
    margin: 4px 0;
}

.order-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-action-btn {
    background-color: #374151;
    color: #e5e7eb;
    border: 1px solid #4b5563;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.order-action-btn:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.order-action-btn.confirm-cancel {
    background-color: #ef4444;
    border-color: #dc2626;
    color: white;
}

.order-action-btn.confirm-cancel:hover {
    background-color: #dc2626;
}

/* Confirmation Dialog */
.confirmation-dialog {
    padding: 20px;
    text-align: center;
}

.confirmation-dialog h4 {
    color: #f59e0b;
    margin-bottom: 15px;
    font-size: 16px;
}

.confirmation-dialog p {
    color: #e5e7eb;
    margin: 10px 0;
    font-size: 14px;
}

.warning-text {
    color: #ef4444;
    font-size: 12px;
    font-style: italic;
}

.confirmation-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Order History Button in Header */
#orderHistoryBtn {
    position: relative;
}

#orderHistoryBtn::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: none;
}

#orderHistoryBtn.has-orders::after {
    display: block;
}

/* Enhanced Message Bubble for Rich Content */
.message-bubble ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-bubble ul li {
    margin: 5px 0;
    line-height: 1.6;
}

.message-bubble strong {
    color: #17a2b8;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .service-grid-mini {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .service-card-mini {
        padding: 10px;
    }
    
    .service-icon-large {
        font-size: 28px;
    }
    
    .order-list {
        max-height: 300px;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-actions .order-action-btn {
        width: 100%;
    }
}

/* Accessibility */
.order-action-btn:focus,
.service-select-btn:focus {
    outline: 2px solid #17a2b8;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .chat-button,
    .chat-window {
        display: none !important;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .service-card-mini {
        background-color: #111827;
    }
    
    .order-card {
        background-color: #111827;
    }
    
    .order-summary {
        background-color: #111827;
    }
}

/* Animation for New Orders */
@keyframes newOrder {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.order-card.new {
    animation: newOrder 0.5s ease;
    border-color: #10b981;
}

/* Status Colors */
.order-status.pending {
    background-color: #f59e0b;
    color: #111827;
}

.order-status.confirmed {
    background-color: #10b981;
    color: #111827;
}

.order-status.in_progress {
    background-color: #3b82f6;
    color: white;
}

.order-status.completed {
    background-color: #6b7280;
    color: white;
}

.order-status.cancelled {
    background-color: #ef4444;
    color: white;
}
