/* Enhanced booking system styles with animations */

/* Booking form animations */
.booking-step {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-step.active {
    opacity: 1;
    transform: translateX(0);
}

/* Step progress indicator */
.step-progress {
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background: var(--color-white);
    padding: 0 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background: #e0e0e0;
    color: #666;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.progress-step.completed .step-number {
    background: var(--color-success);
    color: white;
}

.progress-step.current .step-number {
    background: var(--color-text);
    color: white;
    transform: scale(1.1);
}

.step-name {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: capitalize;
}

.progress-step.completed .step-name,
.progress-step.current .step-name {
    color: var(--color-text);
    font-weight: 600;
}

/* Enhanced calendar styles */
.calendar-day {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-text);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.calendar-day:hover::before {
    transform: scale(1);
}

.calendar-day span {
    position: relative;
    z-index: 1;
    transition: color 0.2s ease;
}

.calendar-day:hover span {
    color: var(--color-white);
}

.calendar-day.selected::before {
    transform: scale(1);
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.disabled:hover::before {
    transform: scale(0);
}

/* Photographer selection styles */
.photographer-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.photographer-option {
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.photographer-label {
    display: block;
    cursor: pointer;
    position: relative;
}

.photographer-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.photographer-info {
    padding: 20px;
    background: var(--color-white);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.photographer-label input[type="radio"]:checked + .photographer-info {
    border-color: var(--color-text);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photographer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.photographer-header h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

.portfolio-btn {
    background: var(--color-border);
    color: var(--color-text);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-btn:hover {
    background: var(--color-text);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.photographer-info p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 14px;
    line-height: 1.5;
}

/* Portfolio modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.modal-open {
    opacity: 1;
}

.modal-content {
    background: var(--color-white);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    width: 800px;
    overflow: hidden;
    transform: scale(0.9) translateY(50px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-overlay.modal-open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--color-text);
    color: var(--color-white);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Portfolio gallery */
.portfolio-gallery {
    width: 100%;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f5f5f5;
    /* FIXED: No fixed height constraint */
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.portfolio-item:hover::before {
    opacity: 1;
}

.portfolio-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: auto; /* FIXED: Natural height */
    max-height: 400px; /* FIXED: Reasonable max height */
    object-fit: contain; /* FIXED: Show complete image */
    transition: all 0.3s ease;
}

.portfolio-item img.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 95vh;
    z-index: 1001;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Availability status */
.availability-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-available {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.status-unavailable {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b2b8 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.status-icon {
    margin-right: 8px;
    font-weight: bold;
}

/* Form validation styles */
.form-input.valid {
    border-color: var(--color-success);
    background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.form-input.invalid {
    border-color: var(--color-error);
    background: linear-gradient(135deg, #fff8f8 0%, #ffffff 100%);
}

.form-input.valid:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Loading spinner */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Success step styles */
.success-step {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    font-size: 40px;
    animation: successPulse 1s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-message h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-success);
    margin-bottom: 16px;
}

.success-message p {
    color: var(--color-text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.booking-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    border-left: 4px solid var(--color-success);
}

.booking-details h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 12px;
}

.booking-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
}

/* Notification enhancements */
.notification {
    transform: translateX(100%);
    animation: slideInNotification 0.3s ease-out forwards;
}

@keyframes slideInNotification {
    to {
        transform: translateX(0);
    }
}

.notification.removing {
    animation: slideOutNotification 0.3s ease-in forwards;
}

@keyframes slideOutNotification {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .photographer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .portfolio-btn {
        align-self: flex-start;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .step-name {
        display: none;
    }
    
    .booking-details-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item img {
        max-height: 350px; /* FIXED: Mobile max height */
    }
}

@media (max-width: 480px) {
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .portfolio-item img {
        max-height: 300px;
    }
    
    .photographer-info {
        padding: 16px;
    }
    
    .success-step {
        padding: 20px 10px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }
    
    .success-message h2 {
        font-size: 22px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .modal-header {
        background: linear-gradient(135deg, #3d3d3d 0%, #2d2d2d 100%);
        border-bottom-color: #444;
    }
    
    .photographer-info {
        background: #3d3d3d;
        border-color: #555;
    }
    
    .photographer-label input[type="radio"]:checked + .photographer-info {
        background: linear-gradient(135deg, #404040 0%, #3d3d3d 100%);
        border-color: #D4B896;
    }
}

/* Print styles */
@media print {
    .booking-form,
    .modal-overlay,
    .notification {
        display: none !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Enhanced Booking CSS - Photographer Selection Fix */
/* Add this to your enhanced-booking.css file */

/* Reset any existing photographer styles first */
.photographer-selection * {
    box-sizing: border-box;
}

.photographer-selection {
    margin-top: 1rem;
    width: 100%;
}

.photographer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.photographer-option {
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.photographer-label {
    display: block;
    cursor: pointer;
    position: relative;
    width: 100%;
}

.photographer-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    left: 0;
    top: 0;
}

/* DEFAULT STATES */
/* All options start with light background */
.photographer-info {
    padding: 1.25rem;
    background: #ffffff !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0 !important;
    color: #333333 !important;
    position: relative;
}

/* First option (No photographer) - Force dark background */
.photographer-options .photographer-option:first-child .photographer-info {
    background: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

/* HOVER STATES */
/* Light options (not first) get darker on hover */
.photographer-options .photographer-option:not(:first-child):not(.selected) .photographer-label:hover .photographer-info {
    background: #f0f0f0 !important;
    border-color: #d0d0d0 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* First option (No photographer) gets lighter on hover when not selected */
.photographer-options .photographer-option:first-child:not(.selected) .photographer-label:hover .photographer-info {
    background: #444444 !important;
    border-color: #444444 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* SELECTED STATES */
/* Any selected option becomes dark */
.photographer-label input[type="radio"]:checked + .photographer-info,
.photographer-option.selected .photographer-info {
    background: #333333 !important;
    border-color: #333333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

/* Selected + Hover */
.photographer-label input[type="radio"]:checked:hover + .photographer-info,
.photographer-option.selected .photographer-label:hover .photographer-info {
    background: #444444 !important;
    border-color: #444444 !important;
    transform: translateY(-2px);
}

/* TEXT AND BUTTON STYLING */
.photographer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.photographer-header h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: inherit !important;
}

.portfolio-btn {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

/* Portfolio button for light backgrounds */
.photographer-options .photographer-option:not(:first-child):not(.selected) .portfolio-btn {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
}

/* Portfolio button for dark backgrounds (first option or selected) */
.photographer-options .photographer-option:first-child .portfolio-btn,
.photographer-option.selected .portfolio-btn,
.photographer-label input[type="radio"]:checked + .photographer-info .portfolio-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.portfolio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.photographer-info p {
    margin: 0;
    color: inherit !important;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Force text color inheritance */
.photographer-info h4,
.photographer-info p,
.photographer-header * {
    color: inherit !important;
}


/* Manual override - Add this at the very end of enhanced-booking.css */
.photographer-selection .photographer-option:first-child .photographer-info {
    background: #333333 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.photographer-selection .photographer-option:not(:first-child) .photographer-info {
    background: #ffffff !important;
    color: #333333 !important; 
    border-color: #e0e0e0 !important;
}

/* Override for selected state - ANY selected option should be dark */
.photographer-selection input[type="radio"]:checked + .photographer-info {
    background: #333333 !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}