/* ============================================================
   KK Catering — Request Reservation Page Styles
   Enqueued via functions.php on the request-reservation template
   ============================================================ */

.error_input {
    border: 1px solid #FF0000;
}
.error {
    color: #FF0000;
}
.success {
    color: green;
}

/* ── Enhanced Form Styling ── */
.reservation-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ── Progress Indicator ── */
.progress-container {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFA500 0%, #FF8C00 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.time-estimate {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ── Required Fields Counter ── */
.fields-counter {
    display: inline-block;
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.fields-counter.complete {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* ── Estimated Quote Display ── */
.quote-calculator {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #FFA500;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: none;
}

.quote-calculator.visible {
    display: block;
    animation: slideIn 0.4s ease;
}

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

.quote-calculator h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quote-breakdown {
    font-size: 14px;
    line-height: 2;
}

.quote-line {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.quote-line.base {
    font-weight: 600;
    font-size: 16px;
}

.quote-line.addon {
    color: #666;
    padding-left: 15px;
}

.quote-line.total {
    border-top: 2px solid #FFA500;
    margin-top: 10px;
    padding-top: 10px;
    font-weight: bold;
    font-size: 18px;
    color: #FF8C00;
}

/* ── Error highlight animation ── */
@keyframes highlight-error {
    0%, 100% { border-color: #FF0000; }
    50%       { border-color: #FF6666; }
}

.error-highlight {
    animation: highlight-error 0.5s ease-in-out 3;
    border-color: #FF0000 !important;
}

/* ── Summary Card ── */
.summary-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #FFA500;
    padding-bottom: 10px;
}

.summary-info {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

.summary-info strong {
    color: #333;
    font-weight: 600;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.info-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* ── Form Sections ── */
.form-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.form-section h4 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    border-left: 4px solid #FFA500;
    padding-left: 15px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

/* ── Inline validation icons ── */
.form-group.valid .form-control {
    border-color: #28a745;
    padding-right: 40px;
}

.form-group.invalid .form-control {
    border-color: #dc3545;
    padding-right: 40px;
}

.validation-icon {
    position: absolute;
    right: 12px;
    top: 38px;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.form-group.valid .validation-icon.success   { opacity: 1; }
.form-group.invalid .validation-icon.error   { opacity: 1; }

/* ── Trust Signals ── */
.trust-signals {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
}

.trust-signals h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trust-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #28a745;
    font-weight: 500;
}

.trust-item::before {
    content: '\2713';
    font-size: 18px;
    font-weight: bold;
}

/* ── Form Controls ── */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #FF0000;
    margin-left: 3px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #FFA500;
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.1);
}

.form-control[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

select.form-control {
    cursor: pointer;
    background-color: #fff;
    padding-right: 40px !important;
    height: auto;
    line-height: normal;
}

select.form-control option {
    padding: 10px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ── Checkbox Groups ── */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.5;
}

/* ── Submit Button ── */
.btn-submit {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    width: 100%;
    max-width: 300px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #FF7700 100%);
    box-shadow: 0 6px 16px rgba(255, 165, 0, 0.4);
    transform: translateY(-2px);
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.05); }
}

.btn-submit.celebrating {
    animation: pulse 0.5s ease-in-out;
}

.submit-container {
    text-align: center;
    margin-top: 30px;
}

.loading-message {
    display: none;
    text-align: center;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
    color: #0066cc;
    font-weight: 500;
}

/* ── Progress Steps ── */
.pstep {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    color: #888;
    border-bottom: 1px solid #e8f0ff;
}
.pstep:last-child { border-bottom: none; }
.pstep-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 13px;
    flex-shrink: 0;
}
.pstep-active            { color: #0055cc; font-weight: 600; }
.pstep-active .pstep-icon { color: #0055cc; }
.pstep-done              { color: #28a745; }
.pstep-done .pstep-icon  { color: #28a745; font-weight: 700; }
.pstep-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #cce0ff;
    border-top-color: #0055cc;
    border-radius: 50%;
    animation: pstep-spin 0.7s linear infinite;
}
@keyframes pstep-spin { to { transform: rotate(360deg); } }

/* ── Notice Boxes ── */
.info-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

.important-notice {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Two Column Layout ── */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Map Preview ── */
.map-preview {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
    display: none;
    animation: fadeIn 0.3s ease;
    position: relative;
}

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

.map-preview.visible {
    display: block;
}

.map-preview iframe {
    width: 100%;
    height: 250px;
    border: 0;
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.map-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.01);
    z-index: 2;
    cursor: not-allowed;
}

.map-overlay:hover::before {
    content: '\1F4CD  Location preview only';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
}

.map-logo {
    position: absolute;
    bottom: 15px; right: 15px;
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 3;
}

.map-logo img {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 4px;
}

.map-loading {
    padding: 15px;
    text-align: center;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
}

/* ── Hide Get Quote button on this page ── */
header .header-cta,
header .get-quote-btn,
header a[href*="get-a-quote"],
.mobile-quote {
    display: none !important;
}

/* ── Pulse animation for power warning ── */
@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); box-shadow: 0 0 20px rgba(255, 193, 7, 0.4); }
    100% { transform: scale(1); }
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .trust-items {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .validation-icon {
        top: 36px;
        right: 10px;
    }

    select.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        -webkit-appearance: menulist;
        appearance: menulist;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .map-preview iframe {
        height: 200px;
    }

    .map-logo img {
        width: 40px;
        height: 40px;
    }

    .reservation-container {
        padding: 10px;
    }

    .form-section {
        padding: 15px;
    }

    .summary-card {
        padding: 15px;
    }
}
