/* Travel Form Plugin - Updated Styles */
.tfp-form {
    background: var(--tfp-background);
    color: var(--tfp-text);
    padding: 80px 40px;
    text-align: center;
    max-width: 1100px;
    margin: 40px auto;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    min-height: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* Align with progress bar */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Progress Bar Styles */
.tfp-progress-container {
    max-width: 1100px;
    margin: 40px auto 0;
    background: rgba(255, 255, 255, 0.05);
    height: 60px;
    border-radius: 12px 12px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 40px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tfp-progress-bar {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--tfp-primary);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1;
}

.tfp-progress-container::after {
    content: '';
    position: absolute;
    left: 40px;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.tfp-progress-steps {
    display: flex;
    justify-content: space-between;
    width: 100%;
    z-index: 2;
}

.tfp-progress-step {
    width: 30px;
    height: 30px;
    background: var(--tfp-background);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

.tfp-progress-step.active {
    border-color: var(--tfp-primary);
    color: var(--tfp-primary);
    box-shadow: 0 0 15px rgba(var(--tfp-primary-rgb), 0.3);
}

.tfp-progress-step.completed {
    background: var(--tfp-primary);
    border-color: var(--tfp-primary);
    color: var(--tfp-background);
}

.tfp-form h2 {
    font-size: 3.5em;
    margin-bottom: 40px;
    color: var(--tfp-text);
    font-family: 'Georgia', serif;
    font-weight: 300;
    letter-spacing: 1px;
}

.tfp-form h2 .highlight {
    color: var(--tfp-primary);
    font-style: italic;
    font-family: 'Georgia', serif;
}

.tfp-form p {
    font-size: 1.2em;
    margin-bottom: 50px;
    color: var(--tfp-text);
    font-weight: 300;
}

/* Options Grid Layout */
.tfp-options-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Centers items horizontally */
    gap: 20px;
    margin-bottom: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.tfp-form label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-size: 1.1em;
    cursor: pointer;
    text-align: left;
    min-height: 55px;
    width: 260px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.tfp-form label:hover {
    border-color: var(--tfp-hover);
    background: rgba(255, 255, 255, 0.08);
}

.tfp-form input[type="checkbox"],
.tfp-form input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #666666;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    background: transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.tfp-form input[type="checkbox"]:checked,
.tfp-form input[type="radio"]:checked {
    background: var(--tfp-primary);
    border-color: var(--tfp-primary);
}

.tfp-form input[type="checkbox"]:checked::after,
.tfp-form input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--tfp-background);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tfp-form label:has(input[type="checkbox"]:checked),
.tfp-form label:has(input[type="radio"]:checked),
.tfp-form label.selected {
    border-color: var(--tfp-primary);
    color: var(--tfp-text);
}

/* Navigation Buttons */
.tfp-nav-buttons {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tfp-form button {
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--tfp-text);
    cursor: pointer;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.3;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tfp-form button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tfp-form button[data-action="previous"] {
    opacity: 1;
    pointer-events: auto;
}

.tfp-form button.active {
    background: var(--tfp-primary);
    border-color: var(--tfp-primary);
    color: var(--tfp-background);
    opacity: 1;
    pointer-events: auto;
    font-weight: 600;
}

.tfp-form button.active:hover {
    background: var(--tfp-hover);
    color: var(--tfp-background);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Spinner Styles */
.tfp-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid currentColor;
    border-radius: 50%;
    animation: tfp-spin 0.8s linear infinite;
    margin-left: 10px;
}

.tfp-form button.loading .tfp-spinner {
    display: inline-block;
}

.tfp-form button.loading .btn-text {
    opacity: 0.7;
}

@keyframes tfp-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Contact Form Styles */
.tfp-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tfp-form .form-group {
    text-align: left;
}

.tfp-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--tfp-primary);
    border: none;
    background: none;
    padding: 0;
}

.tfp-form input[type="text"],
.tfp-form input[type="email"],
.tfp-form input[type="date"],
.tfp-form input[type="number"],
.tfp-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--tfp-text);
    border-radius: 8px;
    font-size: 1.1em;
    padding: 18px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tfp-form input[type="text"]:focus,
.tfp-form input[type="email"]:focus,
.tfp-form input[type="date"]:focus,
.tfp-form input[type="number"]:focus,
.tfp-form textarea:focus {
    outline: none;
    border-color: var(--tfp-primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(var(--tfp-primary-rgb), 0.2);
    transform: scale(1.01);
}

.tfp-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Steps visibility */
.tfp-step {
    display: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
}

.tfp-step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Thank you message */
.tfp-thank-you {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.tfp-thank-you.show {
    display: block;
    animation: fadeInUp 0.8s ease;
}

.tfp-thank-you h2 {
    color: var(--tfp-primary);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.tfp-thank-you p {
    font-size: 1.3em;
    color: #cccccc;
    margin-bottom: 30px;
}

.tfp-thank-you .check-icon {
    font-size: 4em;
    color: #27ae60;
    margin-bottom: 20px;
    animation: bounceIn 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {

    0%,
    20%,
    40%,
    60%,
    80% {
        transform: scale(0.3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tfp-progress-container {
        padding: 0 20px;
        margin-top: 20px;
        height: 50px;
    }

    .tfp-progress-bar {
        left: 20px;
    }

    .tfp-progress-container::after {
        left: 20px;
        right: 20px;
    }

    .tfp-progress-step {
        width: 25px;
        height: 25px;
        font-size: 0.82em;
    }

    .tfp-form {
        padding: 40px 20px;
        margin: 0;
        border-radius: 0 0 12px 12px;
    }

    .tfp-form h2 {
        font-size: 2.1em;
        line-height: 1.2;
    }

    .tfp-form p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }

    .tfp-options-grid {
        gap: 12px;
    }

    .tfp-form label {
        width: 100%;
        max-width: none;
        padding: 15px;
        font-size: 1.05em;
    }

    .tfp-nav-buttons {
        flex-direction: column-reverse;
        /* Put 'Next' on top for easier thumb reach if needed, or keep standard */
        gap: 15px;
    }

    .tfp-form button {
        width: 100%;
        max-width: none;
        padding: 18px 20px;
        /* Bigger touch target */
    }

    .tfp-contact-grid {
        grid-template-columns: 1fr;
    }

    .tfp-form input[type="text"],
    .tfp-form input[type="email"],
    .tfp-form input[type="date"],
    .tfp-form input[type="number"],
    .tfp-form textarea {
        font-size: 16px;
        /* Prevents auto-zoom on iOS */
        padding: 15px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .tfp-form label {
        width: 250px;
    }

    .tfp-options-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        max-width: 700px;
    }
}

/* Admin table styles */
#tfpsubmissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#tfpsubmissions-table th,
#tfpsubmissions-table td {
    padding: 15px;
    border: 1px solid var(--tfp-primary);
    text-align: left;
}

#tfpsubmissions-table th {
    background: var(--tfp-primary);
    color: var(--tfp-background);
    font-weight: 600;
}

#tfpsubmissions-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

#tfpsubmissions-table tbody tr:hover {
    background: #f0f8ff;
}