/**
 * Booking Styles
 * Fotografiescu Gallery
 * 
 * Multi-step booking wizard styling
 * @version 1.0.0
 */

/* ============================================
   BOOKING WRAPPER & LAYOUT
   ============================================ */

.booking-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.booking-overlay.hidden {
    display: none;
}

.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .booking-wrapper {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .booking-sidebar {
        order: -1;
    }
}

/* Close button - hidden (now inline in progress bar) */
.booking-close {
    display: none;
}

/* Inline close button in progress bar */
.booking-close-inline {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-close-inline:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.booking-close-inline svg {
    width: 20px;
    height: 20px;
}

/* Close step styling */
.progress-step.close-step {
    opacity: 0.7;
    margin-left: 8px;
}

.progress-step.close-step:hover {
    opacity: 1;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.booking-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    padding: 40px 20px 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.current .step-number {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    transform: scale(1.1);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    transition: all 0.3s;
}

.progress-step.active .step-number {
    background: rgba(139, 92, 246, 0.5);
}

.step-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .step-label {
        display: none;
    }
    
    .progress-step {
        gap: 4px;
    }
}

/* ============================================
   BOOKING CONTENT
   ============================================ */

.booking-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.booking-step h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
}

.step-description {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 32px;
    font-size: 15px;
}

/* ============================================
   SERVICE SELECTION (Step 1)
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.service-card.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.service-icon svg {
    color: white;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 8px;
}

.service-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px;
    line-height: 1.5;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.service-duration {
    color: rgba(255, 255, 255, 0.5);
}

.service-price {
    color: #8b5cf6;
    font-weight: 600;
}

/* ============================================
   OPTIONS SELECTION (Step 2)
   ============================================ */

.duration-section,
.options-section {
    margin-bottom: 32px;
}

.duration-section h3,
.options-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0 0 16px;
}

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.duration-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 120px;
}

.duration-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.duration-btn.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.dur-label {
    color: white;
    font-weight: 500;
}

.dur-price {
    color: #8b5cf6;
    font-size: 14px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.option-item.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.option-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-weight: bold;
    flex-shrink: 0;
}

.option-item.selected .option-checkbox {
    background: #8b5cf6;
    border-color: #8b5cf6;
    color: white;
}

.option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-name {
    color: white;
    font-weight: 500;
}

.option-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.option-price {
    color: #8b5cf6;
    font-weight: 500;
    white-space: nowrap;
}

/* Discount Progress */
.discount-progress {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 32px;
}

.discount-progress h4 {
    font-size: 14px;
    color: #8b5cf6;
    margin: 0 0 12px;
}

.discount-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.discount-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    opacity: 0.5;
}

.discount-item.achieved {
    opacity: 1;
    background: rgba(34, 197, 94, 0.2);
}

.discount-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.discount-value {
    color: #22c55e;
    font-weight: 600;
    font-size: 13px;
}

/* ============================================
   DATE & TIME SELECTION (Step 3)
   ============================================ */

.datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

@media (max-width: 700px) {
    .datetime-grid {
        grid-template-columns: 1fr;
    }
}

.calendar-section h3,
.timeslots-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0 0 16px;
}

/* Calendar */
.calendar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
}

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

.cal-month {
    font-weight: 600;
    color: white;
}

.cal-nav {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover:not(.empty):not(.unavailable):not(.past) {
    background: rgba(139, 92, 246, 0.3);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.unavailable,
.calendar-day.past {
    color: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
}

.calendar-day.partial {
    background: rgba(245, 158, 11, 0.2);
}

.calendar-day.selected {
    background: #8b5cf6;
    color: white;
}

/* Time Slots */
.timeslots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.timeslot {
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeslot:hover:not(.unavailable) {
    border-color: rgba(255, 255, 255, 0.3);
}

.timeslot.selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.2);
}

.timeslot.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
}

.no-date,
.no-slots {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    padding: 20px;
    text-align: center;
}

/* ============================================
   CUSTOMER DETAILS (Step 4)
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   REVIEW (Step 5)
   ============================================ */

.review-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.review-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.review-section:last-child {
    border-bottom: none;
}

.review-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 8px;
}

.review-section p {
    color: white;
    margin: 4px 0;
}

.review-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.review-section li {
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 0;
}

.review-pricing {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.price-row.discount {
    color: #22c55e;
}

.price-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* ============================================
   SUCCESS (Step 6)
   ============================================ */

.success-step {
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Full-width layout for success step - no sidebar */
.booking-wrapper:has(.success-step) {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

.booking-wrapper:has(.success-step) .booking-sidebar {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin: 32px auto;
    max-width: 400px;
    text-align: left;
}

.success-info p {
    color: white;
    font-weight: 600;
    margin: 0 0 12px;
}

.success-info ol {
    color: rgba(255, 255, 255, 0.7);
    padding-left: 20px;
    margin: 0;
}

.success-info li {
    padding: 6px 0;
}

/* ============================================
   SIDEBAR
   ============================================ */

.booking-sidebar {
    position: sticky;
    top: 40px;
    height: fit-content;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-item .label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.summary-item .value {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.summary-options {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-options .label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.option-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.summary-total {
    padding-top: 16px;
}

.discount-row {
    display: flex;
    justify-content: space-between;
    color: #22c55e;
    font-size: 14px;
    padding: 4px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.total-row span:first-child {
    color: white;
    font-weight: 600;
}

.total-price {
    font-size: 24px;
    font-weight: 700;
    color: #8b5cf6;
}

/* ============================================
   BUTTONS & ACTIONS
   ============================================ */

.booking-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-secondary {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   LOADING & ERRORS
   ============================================ */

.booking-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.booking-loading .loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.booking-loading p {
    color: rgba(255, 255, 255, 0.6);
}

.booking-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 16px;
    color: #ef4444;
    margin-bottom: 24px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.booking-step {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   HEADER BOOK BUTTON
   ============================================ */

/* Hover styles moved to gallery.css - uses white bg / black text inverse */

/* ============================================
   FLOATING BOOK NOW BUTTON (CENTER - FOR ADS)
   ============================================ */

.floating-book-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 900;
    
    display: flex;
    align-items: center;
    gap: 12px;
    
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 60px;
    padding: 18px 32px 18px 24px;
    
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(147, 51, 234, 0.5),
                0 4px 16px rgba(0, 0, 0, 0.3);
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-book-btn:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    box-shadow: 0 12px 40px rgba(147, 51, 234, 0.6),
                0 6px 20px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%) scale(1.05);
}

.floating-book-btn:active {
    transform: translate(-50%, -50%) scale(1);
}

.floating-book-btn .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.floating-book-btn .floating-book-text {
    white-space: nowrap;
}

/* Pulse animation for attention */
.floating-book-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 60px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    opacity: 0;
    z-index: -1;
    animation: pulse-ring-center 2.5s ease-out infinite;
}

@keyframes pulse-ring-center {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Hide during idle mode */
.gallery-app.idle .floating-book-btn {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

/* Hide when booking overlay is open */
.booking-overlay:not(.hidden) ~ .floating-book-btn {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hide when any panel/menu is open */
.mega-menu.open ~ .floating-book-btn,
.filter-panel.open ~ .floating-book-btn,
.info-panel:not(.hidden) ~ .floating-book-btn,
.comments-panel:not(.hidden) ~ .floating-book-btn {
    opacity: 0;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .floating-book-btn {
        padding: 14px 24px 14px 18px;
        font-size: 16px;
        gap: 10px;
    }
    
    .floating-book-btn .icon {
        width: 20px;
        height: 20px;
    }
}

/* Very small screens - icon only */
@media (max-width: 480px) {
    .floating-book-btn {
        padding: 16px;
        border-radius: 50%;
    }
    
    .floating-book-btn .floating-book-text {
        display: none;
    }
}

/* ============================================
   MEGA MENU BOOK NOW STYLING
   ============================================ */

.mega-menu-links .menu-book-now {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mega-menu-links .menu-book-now:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
    transform: translateX(4px);
}
