/**
 * Pulmad Wedding Fair - Public Styles
 * Class names match class-pwf-form.php + class-pwf-booth-manager.php HTML output
 */

.pwf-form-wrapper {
    --pwf-gold: #D4AF37;
    --pwf-gold-dark: #b8972f;
    --pwf-gold-bg: rgba(212, 175, 55, 0.06);
    --pwf-gold-border: rgba(212, 175, 55, 0.2);
    --pwf-gold-shadow: rgba(212, 175, 55, 0.12);
    --pwf-gold-glow: rgba(212, 175, 55, 0.1);
    --pwf-gold-shadow-md: rgba(212, 175, 55, 0.2);
    --pwf-gold-shadow-lg: rgba(212, 175, 55, 0.3);
    --pwf-green: #28a745;
    --pwf-red: #dc3545;
    --pwf-blue: #276FAB;
    --pwf-yellow: #ffc107;
    --pwf-gray: #6c757d;
    --pwf-light: #f8f9fa;
    --pwf-border: #dee2e6;
    --pwf-text: #1e293b;
}

/* ─── Form wrapper ───────────────────────────────── */
.pwf-form-wrapper {
    max-width: 860px;
    margin: 0 auto 40px;
}

/* ─── Fair header ────────────────────────────────── */
.pwf-fair-header {
    text-align: center;
    margin-bottom: 32px;
}

.pwf-fair-header h2 {
    font-size: 28px;
    color: var(--pwf-text);
    margin: 0 0 12px;
}

.pwf-fair-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--pwf-gray);
    font-size: 15px;
}

.pwf-fair-meta .dashicons {
    vertical-align: middle;
    margin-right: 4px;
    color: var(--pwf-gold);
}

/* ─── Progress bar ───────────────────────────────── */
.pwf-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 36px;
    position: relative;
    counter-reset: step;
}

.pwf-progress::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 5%;
    right: 5%;
    height: 2px;
    background: var(--pwf-border);
    z-index: 0;
}

.pwf-progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pwf-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 2px solid var(--pwf-border);
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    color: var(--pwf-gray);
    transition: all 0.3s;
}

.pwf-progress .pwf-progress-step .pwf-step-title {
    display: block;
    font-size: 11px !important;
    color: var(--pwf-gray);
    margin-top: 6px;
    line-height: 1.3;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Active step */
.pwf-progress-step.pwf-step-active .pwf-step-number {
    border-color: var(--pwf-gold);
    background: var(--pwf-gold);
    color: #fff;
}

.pwf-progress .pwf-progress-step.pwf-step-active .pwf-step-title {
    color: var(--pwf-gold);
    font-weight: 600;
}

/* Completed step */
.pwf-progress-step.pwf-step-completed .pwf-step-number {
    border-color: var(--pwf-green);
    background: var(--pwf-green);
    color: #fff;
}

/* ─── Form steps ─────────────────────────────────── */
.pwf-step-content {
    display: none;
    animation: pwfFadeIn 0.3s ease;
}

.pwf-step-content.pwf-step-active {
    display: block;
}

@keyframes pwfFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pwf-step-content h3 {
    font-size: 22px;
    color: var(--pwf-text);
    margin: 0 0 8px;
}

.pwf-step-desc {
    color: var(--pwf-gray);
    margin-bottom: 24px;
    font-size: 15px;
}

/* ─── Option cards (catalog + copresenter) ───────── */
.pwf-option-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pwf-option-cards-small {
    max-width: 480px;
}

.pwf-option-card {
    display: block;
    position: relative;
    padding: 20px;
    background: #fff;
    border: 2px solid var(--pwf-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.pwf-option-card:hover {
    border-color: var(--pwf-gold);
    box-shadow: 0 2px 12px var(--pwf-gold-shadow);
}

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

.pwf-option-card input[type="radio"]:checked ~ .pwf-card-content {
    /* handled below */
}

.pwf-option-card:has(input:checked) {
    border-color: var(--pwf-gold);
    background: var(--pwf-gold-bg);
}

.pwf-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.pwf-card-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--pwf-gray);
}

.pwf-option-card:has(input:checked) .pwf-card-icon .dashicons {
    color: var(--pwf-gold);
}

.pwf-card-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--pwf-text);
}

.pwf-card-desc {
    font-size: 13px;
    color: var(--pwf-gray);
}

.pwf-card-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--pwf-green);
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pwf-card-price {
    font-weight: 600;
    color: var(--pwf-gold);
}

/* ─── Auto-catalog notice ────────────────────────── */
.pwf-auto-catalog-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    background: var(--pwf-gold-bg);
    border: 1px solid var(--pwf-gold-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--pwf-text);
}

.pwf-auto-catalog-notice .dashicons {
    color: var(--pwf-green);
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ─── Booth selector ─────────────────────────────── */
.pwf-booth-selector-wrap {
    margin-top: 8px;
}

.pwf-booth-selector {
    margin-bottom: 20px;
}

.pwf-floor-plan {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.pwf-floor-plan img {
    width: 100%;
    height: auto;
    display: block;
}

.pwf-booth-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--pwf-light);
    border-radius: 8px;
    margin-bottom: 16px;
}

.pwf-booth-row {
    display: flex;
    gap: 8px;
}

.pwf-booth {
    flex: 1;
    min-width: 70px;
    min-height: 54px;
    padding: 8px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}

.pwf-booth:hover:not(.pwf-booth-reserved):not(.pwf-booth-selected) {
    border-color: var(--pwf-gold);
    box-shadow: 0 2px 8px var(--pwf-gold-shadow-md);
    transform: translateY(-1px);
}

.pwf-booth-selected {
    border-color: var(--pwf-gold) !important;
    background-color: var(--pwf-gold) !important;
    color: #fff;
}

.pwf-booth-reserved {
    background-color: #999 !important;
    cursor: not-allowed;
    opacity: 0.5;
}

.pwf-booth-reserved::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--pwf-red);
    transform: rotate(-45deg);
}

.pwf-booth-id {
    font-weight: 700;
    font-size: 14px;
    display: block;
}

.pwf-booth-status {
    font-size: 10px;
    display: block;
    opacity: 0.8;
}

/* Booth legend */
.pwf-booth-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.pwf-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--pwf-gray);
}

.pwf-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.pwf-legend-color.pwf-reserved {
    background-color: #999;
}

/* Selected booths display */
.pwf-selected-booths {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--pwf-border);
    border-radius: 6px;
    margin-top: 12px;
}

.pwf-selected-booths-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.pwf-selected-booth-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--pwf-gold);
    color: #fff;
    border-radius: 4px;
    margin: 2px 4px 2px 0;
    font-size: 13px;
    font-weight: 600;
}

.pwf-none-selected {
    color: var(--pwf-gray);
    font-size: 13px;
    font-style: italic;
}

/* Included items box */
.pwf-included-items {
    padding: 16px;
    background: var(--pwf-gold-bg);
    border: 1px solid var(--pwf-gold-border);
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.pwf-included-items strong {
    display: block;
    margin-bottom: 4px;
}

/* ─── Services ───────────────────────────────────── */
.pwf-services-list {
    display: grid;
    gap: 10px;
}

.pwf-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--pwf-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pwf-service-item:hover {
    border-color: var(--pwf-gold);
}

.pwf-service-item:has(input:checked) {
    border-color: var(--pwf-gold);
    background: var(--pwf-gold-bg);
}

.pwf-service-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--pwf-gold);
}

.pwf-service-content {
    flex: 1;
}

.pwf-service-name {
    font-weight: 600;
    color: var(--pwf-text);
    display: block;
}

.pwf-service-desc {
    font-size: 13px;
    color: var(--pwf-gray);
    display: block;
    margin-top: 2px;
}

.pwf-service-price {
    font-weight: 700;
    color: var(--pwf-gold);
    white-space: nowrap;
    font-size: 15px;
}

.pwf-no-services {
    color: var(--pwf-gray);
    font-style: italic;
}

/* ─── Form fields ────────────────────────────────── */
.pwf-form-section {
    margin-bottom: 24px;
}

.pwf-form-section h4 {
    font-size: 16px;
    color: var(--pwf-text);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pwf-border);
}

.pwf-form-row {
    margin-bottom: 16px;
}

.pwf-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--pwf-text);
}

.pwf-form-row input[type="text"],
.pwf-form-row input[type="email"],
.pwf-form-row input[type="tel"],
.pwf-form-row input[type="url"],
.pwf-form-row textarea,
.pwf-form-row select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--pwf-border);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
    background: #fff;
}

.pwf-form-row input:focus,
.pwf-form-row textarea:focus,
.pwf-form-row select:focus {
    outline: none;
    border-color: var(--pwf-gold);
    box-shadow: 0 0 0 3px var(--pwf-gold-glow);
}

.pwf-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pwf-field-error {
    border-color: var(--pwf-red) !important;
}

.pwf-error-message {
    color: var(--pwf-red);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* ─── Copresenter fields ─────────────────────────── */
.pwf-copresenter-fields {
    padding: 20px;
    background: var(--pwf-light);
    border-radius: 8px;
    margin-top: 20px;
}

/* ─── Pricing summary ────────────────────────────── */
.pwf-price-summary {
    background: #fff;
    border: 1px solid var(--pwf-border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}

.pwf-price-summary h4 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pwf-border);
    font-size: 16px;
}

.pwf-pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.pwf-pricing-row.pwf-subtotal {
    border-top: 1px solid var(--pwf-border);
    margin-top: 8px;
    padding-top: 12px;
}

.pwf-pricing-row.pwf-discount {
    color: var(--pwf-green);
}

.pwf-pricing-row.pwf-total {
    border-top: 2px solid var(--pwf-gold);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
}

.pwf-pricing-row.pwf-total .pwf-pricing-value {
    color: var(--pwf-gold);
}

.pwf-pricing-label {
    color: var(--pwf-gray);
}

.pwf-pricing-details {
    font-size: 12px;
    color: var(--pwf-gray);
    padding: 2px 0 6px;
    line-height: 1.5;
}

.pwf-price-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid var(--pwf-gold);
    padding-top: 16px;
    margin-top: 12px;
}

.pwf-price-total span:last-child {
    color: var(--pwf-gold);
}

/* ─── Payment options ────────────────────────────── */
.pwf-payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pwf-payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--pwf-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.pwf-payment-option:hover {
    border-color: var(--pwf-gold);
}

.pwf-payment-option:has(input:checked) {
    border-color: var(--pwf-gold);
    background: var(--pwf-gold-bg);
}

.pwf-payment-option input[type="radio"] {
    accent-color: var(--pwf-gold);
}

.pwf-reservation-note {
    font-size: 13px;
    color: var(--pwf-gray);
    margin-top: 12px;
    font-style: italic;
}

/* ─── Terms checkbox ─────────────────────────────── */
.pwf-terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: var(--pwf-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.pwf-terms-checkbox input {
    margin-top: 2px;
    accent-color: var(--pwf-gold);
}

.pwf-terms-checkbox a {
    color: var(--pwf-gold);
}

/* ─── Navigation buttons ─────────────────────────── */
.pwf-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--pwf-border);
}

.pwf-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.pwf-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pwf-btn-primary {
    background: var(--pwf-gold);
    color: #fff;
}

.pwf-btn-primary:hover {
    background: var(--pwf-gold-dark);
}

.pwf-btn-prev {
    background: var(--pwf-light);
    color: var(--pwf-text);
    border: 1px solid var(--pwf-border);
}

.pwf-btn-prev:hover {
    background: #e9ecef;
}

.pwf-btn-submit {
    background: var(--pwf-green);
    color: #fff;
    padding: 14px 28px;
    font-size: 16px;
}

.pwf-btn-submit:hover {
    background: #218838;
}

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

/* ─── Alerts ─────────────────────────────────────── */
.pwf-alert {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.pwf-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.pwf-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.pwf-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.pwf-notice {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 15px;
}

.pwf-notice-error {
    background: #fef2f2;
    color: #991b1b;
}

.pwf-notice-warning {
    background: #fffbeb;
    color: #92400e;
}

/* ─── Success message ────────────────────────────── */
.pwf-success-message {
    text-align: center;
    padding: 60px 20px;
}

.pwf-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--pwf-green);
    border-radius: 50%;
    color: #fff;
    font-size: 40px;
    margin-bottom: 20px;
}

.pwf-success-message h2 {
    color: var(--pwf-green);
    margin-bottom: 12px;
}

.pwf-success-details {
    max-width: 480px;
    margin: 0 auto;
    color: var(--pwf-gray);
    line-height: 1.6;
}

/* ─── Loading ────────────────────────────────────── */
.pwf-loading {
    text-align: center;
    padding: 20px;
    color: var(--pwf-gray);
}

.pwf-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--pwf-border);
    border-top-color: var(--pwf-gold);
    border-radius: 50%;
    animation: pwfSpin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

/* ─── Review table ───────────────────────────────── */
.pwf-review-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.pwf-review-table th,
.pwf-review-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--pwf-border);
    font-size: 14px;
}

.pwf-review-table th {
    color: var(--pwf-gray);
    font-weight: 500;
    width: 140px;
}

/* ─── Positioned booth mode (floor plan overlay) ──── */
.pwf-booth-positioned {
    position: relative;
    display: block;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.pwf-booth-positioned .pwf-positioned-bg {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.pwf-booth-positioned .pwf-booth {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    padding: 2px;
    min-width: 0;
    min-height: 0;
}

.pwf-booth-positioned .pwf-booth:hover:not(.pwf-booth-reserved):not(.pwf-booth-selected) {
    border-color: var(--pwf-gold);
    box-shadow: 0 0 0 2px var(--pwf-gold), 0 2px 8px var(--pwf-gold-shadow-lg);
    z-index: 10;
}

.pwf-booth-positioned .pwf-booth-selected {
    border-color: var(--pwf-gold) !important;
    box-shadow: 0 0 0 3px var(--pwf-gold);
    z-index: 10;
}

.pwf-booth-positioned .pwf-booth-reserved {
    opacity: 0.4;
    cursor: not-allowed;
}

.pwf-booth-positioned .pwf-booth-reserved::after {
    display: none; /* No diagonal line in positioned mode */
}

.pwf-booth-positioned.pwf-readonly .pwf-booth {
    cursor: default;
}

/* Checkout note */
.pwf-checkout-note {
    padding: 14px 18px;
    background: var(--pwf-gold-bg);
    border: 1px solid var(--pwf-gold-border);
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--pwf-gray);
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .pwf-step-title {
        display: none;
    }

    .pwf-option-cards {
        grid-template-columns: 1fr;
    }

    .pwf-form-row-half {
        grid-template-columns: 1fr;
    }

    .pwf-fair-meta {
        flex-direction: column;
        gap: 8px;
    }

    .pwf-booth-grid {
        padding: 10px;
    }

    .pwf-booth {
        min-width: 55px;
        min-height: 42px;
        padding: 5px;
    }

    .pwf-booth-price {
        font-size: 10px;
    }

    .pwf-form-nav {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .pwf-btn {
        width: 100%;
        justify-content: center;
    }
}
