/**
 * FixMyTyreNow Booking – Frontend Styles
 */

:root {
    --fmt-orange:       #FF6A00;
    --fmt-orange-dark:  #E05A00;
    --fmt-dark:         #111111;
    --fmt-gray:         #666666;
    --fmt-light-gray:   #f5f5f5;
    --fmt-border:       #e0e0e0;
    --fmt-white:        #ffffff;
    --fmt-green:        #16a34a;
    --fmt-red:          #dc2626;
    --fmt-radius:       8px;
    --fmt-radius-lg:    12px;
    --fmt-shadow:       0 4px 20px rgba(0, 0, 0, 0.10);
}

/* ============================
   Booking Form
   ============================ */

.fmt-booking-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.fmt-booking-form {
    background: var(--fmt-white);
    border-radius: var(--fmt-radius-lg);
    box-shadow: var(--fmt-shadow);
    padding: 40px;
    border: 1px solid var(--fmt-border);
}

.fmt-form-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--fmt-dark);
    margin: 0 0 6px;
}

.fmt-form-subtitle {
    font-size: 15px;
    color: var(--fmt-gray);
    margin: 0 0 28px;
}

.fmt-form-section {
    margin-bottom: 24px;
}

.fmt-form-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--fmt-orange);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #fff0e6;
}

.fmt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.fmt-form-row.single {
    grid-template-columns: 1fr;
}

.fmt-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fmt-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fmt-dark);
}

.fmt-form-group label .fmt-required {
    color: var(--fmt-red);
    margin-left: 2px;
}

.fmt-form-group input,
.fmt-form-group select,
.fmt-form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--fmt-border);
    border-radius: var(--fmt-radius);
    font-size: 15px;
    color: var(--fmt-dark);
    background: var(--fmt-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.fmt-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}

.fmt-form-group input:focus,
.fmt-form-group select:focus,
.fmt-form-group textarea:focus {
    outline: none;
    border-color: var(--fmt-orange);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}

.fmt-form-group input::placeholder,
.fmt-form-group textarea::placeholder {
    color: #bbb;
}

.fmt-form-group textarea {
    resize: vertical;
    min-height: 90px;
}

/* Service price hint */
.fmt-service-price-hint {
    font-size: 13px;
    color: var(--fmt-orange);
    font-weight: 600;
    margin-top: 3px;
    min-height: 18px;
}

/* Deposit info box */
.fmt-deposit-info {
    background: linear-gradient(135deg, #fff7f0, #fff3e8);
    border: 1px solid #ffd4b0;
    border-radius: var(--fmt-radius);
    padding: 14px 18px;
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fmt-deposit-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fmt-deposit-text {
    font-size: 14px;
    color: var(--fmt-dark);
    line-height: 1.5;
}

.fmt-deposit-text strong {
    color: var(--fmt-orange);
}

/* Submit Button */
.fmt-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--fmt-orange), var(--fmt-orange-dark));
    color: var(--fmt-white);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--fmt-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.fmt-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--fmt-orange-dark), #c04d00);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 106, 0, 0.35);
}

.fmt-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Error message */
.fmt-form-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--fmt-red);
    padding: 12px 16px;
    border-radius: var(--fmt-radius);
    font-size: 14px;
    font-weight: 500;
    margin-top: 14px;
}

/* Spinner */
.fmt-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: var(--fmt-white);
    border-radius: 50%;
    animation: fmt-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ============================
   Confirmation Page
   ============================ */

.fmt-confirmation-page,
.fmt-failed-page {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 0 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fmt-confirm-hero,
.fmt-failed-hero {
    text-align: center;
    padding: 40px 20px 30px;
}

.fmt-confirm-icon,
.fmt-failed-icon {
    font-size: 64px;
    margin-bottom: 16px;
    line-height: 1;
}

.fmt-confirm-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--fmt-dark);
    margin: 0 0 10px;
}

.fmt-confirm-subtitle {
    font-size: 16px;
    color: var(--fmt-gray);
    margin: 0;
}

.fmt-confirm-reference {
    background: linear-gradient(135deg, var(--fmt-orange), var(--fmt-orange-dark));
    color: var(--fmt-white);
    border-radius: var(--fmt-radius-lg);
    padding: 28px 30px;
    text-align: center;
    margin-bottom: 24px;
}

.fmt-ref-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin: 0 0 8px;
}

.fmt-ref-number {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 3px;
    margin: 0 0 8px;
}

.fmt-ref-note {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

.fmt-confirm-summary {
    background: var(--fmt-white);
    border: 1px solid var(--fmt-border);
    border-radius: var(--fmt-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--fmt-shadow);
}

.fmt-confirm-summary h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--fmt-orange);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff0e6;
}

.fmt-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.fmt-summary-table tr {
    border-bottom: 1px solid var(--fmt-light-gray);
}

.fmt-summary-table tr:last-child {
    border-bottom: none;
}

.fmt-summary-table td {
    padding: 10px 4px;
    font-size: 14px;
}

.fmt-summary-table td:first-child {
    color: var(--fmt-gray);
    width: 40%;
}

.fmt-summary-table td:last-child {
    color: var(--fmt-dark);
}

/* Next Steps */
.fmt-confirm-next-steps {
    background: var(--fmt-white);
    border: 1px solid var(--fmt-border);
    border-radius: var(--fmt-radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--fmt-shadow);
}

.fmt-confirm-next-steps h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--fmt-orange);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff0e6;
}

.fmt-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fmt-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.fmt-step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    background: var(--fmt-orange);
    color: var(--fmt-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.fmt-step-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--fmt-dark);
    margin-bottom: 3px;
}

.fmt-step-text p {
    font-size: 14px;
    color: var(--fmt-gray);
    margin: 0;
    line-height: 1.5;
}

/* Contact box */
.fmt-confirm-contact {
    text-align: center;
    padding: 20px;
    background: var(--fmt-light-gray);
    border-radius: var(--fmt-radius);
}

.fmt-confirm-contact p {
    font-size: 15px;
    color: var(--fmt-gray);
    margin: 0;
}

.fmt-confirm-contact a {
    color: var(--fmt-orange);
    font-weight: 700;
    text-decoration: none;
}

/* ============================
   Failed Page
   ============================ */

.fmt-failed-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--fmt-red);
    margin: 0 0 10px;
}

.fmt-failed-subtitle {
    font-size: 16px;
    color: var(--fmt-gray);
    margin: 0;
}

.fmt-failed-reference {
    text-align: center;
    background: var(--fmt-light-gray);
    border-radius: var(--fmt-radius);
    padding: 14px;
    margin-bottom: 24px;
}

.fmt-failed-content {
    background: var(--fmt-white);
    border: 1px solid var(--fmt-border);
    border-radius: var(--fmt-radius-lg);
    padding: 28px;
    box-shadow: var(--fmt-shadow);
}

.fmt-failed-content p {
    font-size: 15px;
    color: var(--fmt-dark);
    margin: 0 0 14px;
}

.fmt-failed-content ul {
    color: var(--fmt-gray);
    font-size: 14px;
    margin: 0 0 24px;
    padding-left: 20px;
    line-height: 2;
}

.fmt-failed-note {
    font-size: 13px;
    color: var(--fmt-gray);
    margin-top: 16px;
    font-style: italic;
}

.fmt-failed-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fmt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 22px;
    border-radius: var(--fmt-radius);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.fmt-btn-primary {
    background: var(--fmt-orange);
    color: var(--fmt-white);
}

.fmt-btn-primary:hover {
    background: var(--fmt-orange-dark);
    color: var(--fmt-white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 106, 0, 0.3);
}

.fmt-btn-secondary {
    background: var(--fmt-light-gray);
    color: var(--fmt-dark);
    border: 1px solid var(--fmt-border);
}

.fmt-btn-secondary:hover {
    background: var(--fmt-border);
    color: var(--fmt-dark);
    text-decoration: none;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 600px) {
    .fmt-booking-form {
        padding: 24px 20px;
    }

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

    .fmt-confirm-title,
    .fmt-failed-title {
        font-size: 24px;
    }

    .fmt-ref-number {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .fmt-failed-actions {
        flex-direction: column;
    }

    .fmt-btn {
        justify-content: center;
    }
}
