/**
 * Transport Confirmation Form Styles
 *
 * @package CienoneTransportConfirmationForm
 * @since 1.0.0
 */

/* ===========================
   CSS Variables & Base Styles
   =========================== */
:root {
    --tcf-primary: #007cba;
    --tcf-primary-hover: #005a87;
    --tcf-success: #28a745;
    --tcf-error: #dc3232;
    --tcf-text: #333333;
    --tcf-text-light: #666666;
    --tcf-border: #ddd;
    --tcf-bg-light: #f9f9f9;
    --tcf-white: #ffffff;
    --tcf-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --tcf-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --tcf-radius: 8px;
    --tcf-spacing: 20px;
}

/* ===========================
   Form Container
   =========================== */
.tcf-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--tcf-spacing);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--tcf-text);
    line-height: 1.6;
}

.tcf-form {
    background: var(--tcf-white);
    border-radius: var(--tcf-radius);
    overflow: hidden;
}

/* ===========================
   Form Sections
   =========================== */
.tcf-section {
    background: var(--tcf-white);
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--tcf-shadow);
    transition: box-shadow 0.3s ease;
}

.tcf-section:hover {
    box-shadow: var(--tcf-shadow-hover);
}

.tcf-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 10px 0 !important;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tcf-primary);
    font-size: 20px;
    font-weight: 600;
    color: var(--tcf-primary);
}

.tcf-section-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* ===========================
   Form Fields
   =========================== */
.tcf-fields-group {
    display: grid;
    gap: 20px;
}

.tcf-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tcf-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--tcf-text);
    margin-bottom: 4px;
}

.tcf-required {
    color: var(--tcf-error);
    font-weight: bold;
}

/* Input Fields */
.tcf-input,
.tcf-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--tcf-text);
    background-color: var(--tcf-white);
    border: 2px solid var(--tcf-border);
    border-radius: 6px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tcf-input:focus,
.tcf-textarea:focus {
    outline: none;
    border-color: var(--tcf-primary);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tcf-input:invalid:not(:placeholder-shown),
.tcf-textarea:invalid:not(:placeholder-shown) {
    border-color: var(--tcf-error);
}

.tcf-input:valid:not(:placeholder-shown):not(.tcf-input-readonly),
.tcf-textarea:valid:not(:placeholder-shown) {
    border-color: var(--tcf-success);
}

/* Read-only Fields */
.tcf-input-readonly {
    background-color: var(--tcf-bg-light);
    cursor: not-allowed;
    color: var(--tcf-text-light);
}

.tcf-input-readonly:focus {
    border-color: var(--tcf-border);
    box-shadow: none;
}

/* Textarea */
.tcf-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===========================
   Radio Buttons
   =========================== */
.tcf-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.tcf-radio-group-payment {
    flex-direction: column;
}

.tcf-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--tcf-bg-light);
    border: 2px solid var(--tcf-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tcf-radio-label:hover {
    background: var(--tcf-white);
    border-color: var(--tcf-primary);
}

.tcf-radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--tcf-primary);
}

.tcf-radio-label input[type="radio"]:checked + span {
    color: var(--tcf-primary);
    font-weight: 600;
}

.tcf-radio-label:has(input[type="radio"]:checked) {
    background: rgba(0, 124, 186, 0.1);
    border-color: var(--tcf-primary);
}

/* ===========================
   Honeypot (Anti-Spam)
   =========================== */
.tcf-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ===========================
   Submit Button
   =========================== */
.tcf-submit-wrapper {
    margin-top: 30px;
    text-align: center;
}

.tcf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tcf-white);
    background: var(--tcf-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 200px;
}

.tcf-submit-btn:hover:not(:disabled) {
    background: var(--tcf-primary-hover);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.tcf-submit-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tcf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tcf-submit-loading {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loading Spinner */
.tcf-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--tcf-white);
    border-radius: 50%;
    animation: tcf-spin 0.8s linear infinite;
}

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

/* ===========================
   Messages
   =========================== */
.tcf-message {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    animation: tcf-slideIn 0.3s ease;
}

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

.tcf-message.tcf-message-success {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid var(--tcf-success);
    color: #155724;
}

.tcf-message.tcf-message-error {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid var(--tcf-error);
    color: #721c24;
}

.tcf-message.tcf-message-info {
    background: rgba(0, 124, 186, 0.1);
    border: 2px solid var(--tcf-primary);
    color: #004085;
}

/* ===========================
   Transport Details Info Display
   =========================== */
.tcf-info-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tcf-info-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--tcf-white);
    border: 1px solid var(--tcf-border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tcf-info-row:hover {
    background: var(--tcf-bg-light);
    border-color: var(--tcf-primary);
}

.tcf-info-label {
    font-weight: 700;
    color: var(--tcf-text);
    min-width: 140px;
    flex-shrink: 0;
    font-size: 14px;
}

.tcf-info-value {
    color: var(--tcf-text-light);
    font-size: 15px;
    flex: 1;
}

/* ===========================
   Gratuity Message
   =========================== */
.tcf-gratuity-message {
    margin: 8px 0 12px 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--tcf-primary);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #0c4a6e;
}

/* ===========================
   Section-Specific Styles
   =========================== */
.tcf-section-transport {
    background: linear-gradient(135deg, #f5f9fc 0%, #ffffff 100%);
}

.tcf-section-passenger .dashicons-admin-users,
.tcf-section-emergency .dashicons-sos {
    color: var(--tcf-primary);
}

.tcf-section-communication .dashicons-email {
    color: #2271b1;
}

.tcf-section-special .dashicons-star-filled {
    color: #f0b849;
}

.tcf-section-payment .dashicons-money-alt {
    color: #28a745;
}

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

/* Tablet */
@media (max-width: 768px) {
    .tcf-form-container {
        padding: 15px;
    }

    .tcf-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .tcf-section-title {
        font-size: 18px;
    }

    .tcf-section-title .dashicons {
        font-size: 22px;
        width: 22px;
        height: 22px;
    }

    .tcf-fields-group {
        gap: 16px;
    }

    .tcf-radio-group {
        gap: 10px;
    }

    .tcf-submit-btn {
        padding: 12px 32px;
        font-size: 15px;
        min-width: 180px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .tcf-form-container {
        padding: 10px;
    }

    .tcf-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .tcf-section-title {
        font-size: 16px;
        gap: 8px;
    }

    .tcf-section-title .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }

    .tcf-fields-group {
        gap: 14px;
    }

    .tcf-input,
    .tcf-textarea {
        padding: 10px 14px;
        font-size: 14px;
    }

    .tcf-radio-group {
        flex-direction: column;
        gap: 8px;
    }

    .tcf-radio-label {
        padding: 10px 14px;
        font-size: 13px;
    }

    .tcf-submit-btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 14px;
        min-width: auto;
    }

    .tcf-message {
        padding: 14px 16px;
        font-size: 14px;
    }

    /* Info display responsive */
    .tcf-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }

    .tcf-info-label {
        min-width: auto;
        width: 100%;
    }

    .tcf-gratuity-message {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .tcf-submit-wrapper,
    .tcf-message {
        display: none !important;
    }

    .tcf-section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ===========================
   Accessibility
   =========================== */
.tcf-input:focus-visible,
.tcf-textarea:focus-visible,
.tcf-radio-label:focus-within {
    outline: 3px solid var(--tcf-primary);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .tcf-section {
        border-width: 2px;
    }

    .tcf-input,
    .tcf-textarea {
        border-width: 2px;
    }
}

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