/* ============================================
   BOOKING MODAL - STYLES
   ============================================ */

.booking-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.booking-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.booking-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(30px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.booking-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.booking-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.booking-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body */
.booking-modal-body {
    padding: 1.5rem;
}

/* Service Info Card */
.booking-service-info {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.booking-service-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #667eea;
    flex-shrink: 0;
}

.booking-service-details h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.booking-service-provider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.booking-service-price {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

/* Distance Warning */
.booking-distance-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.booking-distance-warning.active {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.booking-distance-warning.error {
    background: #fee2e2;
    border-left-color: #ef4444;
}

.booking-distance-warning i {
    margin-right: 0.5rem;
}

/* Form Groups */
.booking-form-group {
    margin-bottom: 1.25rem;
}

.booking-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.booking-form-group label i {
    margin-right: 0.5rem;
    color: #667eea;
}

.booking-form-group input,
.booking-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.booking-form-group input:focus,
.booking-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.booking-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.booking-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Distance Display */
.booking-distance-display {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
}

.booking-distance-display.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.booking-distance-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.booking-distance-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.booking-distance-status.ok {
    color: #10b981;
}

.booking-distance-status.warning {
    color: #f59e0b;
}

.booking-distance-status.error {
    color: #ef4444;
}

/* Footer */
.booking-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.booking-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.booking-btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.booking-btn-cancel:hover {
    background: #e5e7eb;
}

.booking-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.booking-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.booking-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.booking-btn-submit i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading State */
.booking-modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.booking-modal-loading.active {
    display: flex;
}

.booking-loader {
    text-align: center;
}

.booking-loader i {
    font-size: 3rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

.booking-loader p {
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Success Message */
.booking-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.booking-success.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.booking-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.booking-success-icon i {
    font-size: 2.5rem;
    color: white;
}

.booking-success h3 {
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.booking-success p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.booking-number {
    display: inline-block;
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

/* ============================================
   ADDRESS DETECTION STYLES
   ============================================ */

/* Address Input Wrapper */
.booking-address-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.booking-address-input-wrapper input {
    flex: 1;
}

/* Detect Address Button - Icon Only */
.booking-detect-address-btn {
    background: linear-gradient(135deg, #002B7F, #003399);
    color: white;
    border: none;
    padding: 0;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.booking-detect-address-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #003399, #0044CC);
    transform: translateY(-1px) rotate(180deg);
    box-shadow: 0 4px 12px rgba(0, 43, 127, 0.3);
}

.booking-detect-address-btn:active:not(:disabled) {
    transform: translateY(0) rotate(180deg);
    box-shadow: 0 2px 6px rgba(0, 43, 127, 0.2);
}

.booking-detect-address-btn:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    opacity: 0.7;
}

.booking-detect-address-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.booking-detect-address-btn:disabled i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Address Detection Status */
.booking-address-status {
    margin-top: 8px;
    padding: 0;
    font-size: 0.875rem;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.booking-address-status.info,
.booking-address-status.loading,
.booking-address-status.success,
.booking-address-status.error {
    display: flex;
    padding: 10px 12px;
}

.booking-address-status.info {
    background: #EFF6FF;
    color: #1E40AF;
    border-left: 3px solid #3B82F6;
}

.booking-address-status.loading {
    background: #F3F4F6;
    color: #4B5563;
    border-left: 3px solid #9CA3AF;
}

.booking-address-status.success {
    background: #ECFDF5;
    color: #065F46;
    border-left: 3px solid #10B981;
}

.booking-address-status.error {
    background: #FEF2F2;
    color: #991B1B;
    border-left: 3px solid #EF4444;
}

.booking-address-status i {
    flex-shrink: 0;
}

/* Optional Address Details */
.booking-optional-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.booking-optional-details label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.booking-optional-details input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.booking-optional-details input:focus {
    outline: none;
    border-color: #002B7F;
    box-shadow: 0 0 0 3px rgba(0, 43, 127, 0.1);
}

.booking-optional-details input::placeholder {
    color: #9CA3AF;
}

/* ============================================
   INTERACTIVE MAP SECTION
   ============================================ */

.booking-map-section {
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    animation: slideDown 0.4s ease;
}

.booking-map-header {
    margin-bottom: 1rem;
}

.booking-map-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-map-header h4 i {
    color: #002B7F;
}

.booking-map-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #6B7280;
}

.booking-map {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.booking-map-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.booking-btn-confirm-location,
.booking-btn-change-location {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.booking-btn-confirm-location {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.booking-btn-confirm-location:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.booking-btn-change-location {
    background: white;
    color: #6B7280;
    border: 2px solid #D1D5DB;
}

.booking-btn-change-location:hover {
    border-color: #9CA3AF;
    color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Optional Address Details */

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .booking-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        margin-top: auto;
    }
    
    .booking-form-row {
        grid-template-columns: 1fr;
    }
    
    .booking-service-info {
        flex-direction: column;
        text-align: center;
    }
    
    .booking-modal-footer {
        flex-direction: column-reverse;
    }
    
    .booking-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Address Detection Responsive */
    .booking-address-input-wrapper {
        gap: 8px; /* Păstrează layout-ul inline */
    }
    
    .booking-detect-address-btn {
        width: 42px;
        height: 42px;
    }
    
    .booking-optional-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .booking-optional-details {
        grid-template-columns: 1fr;
    }
    
    .booking-map {
        height: 250px;
    }
    
    .booking-map-actions {
        flex-direction: column;
    }
    
    .booking-btn-confirm-location,
    .booking-btn-change-location {
        width: 100%;
        justify-content: center;
    }
}
