/* QuickForm Frontend Styles - Mobile Friendly */

.quickform-wrapper {
    max-width: var(--qf-max-width, 800px);
    margin: 0 auto;
    padding: 20px;
    font-family: var(--qf-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

.qf-form-title {
    margin-bottom: 20px;
    font-size: 24px;
}

.quickform-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qf-field label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.qf-required {
    color: #d63638;
}

.qf-field input[type="text"],
.qf-field input[type="email"],
.qf-field input[type="number"],
.qf-field input[type="tel"],
.qf-field input[type="date"],
.qf-field input[type="file"],
.qf-field input[type="url"],
.qf-field input[type="password"],
.qf-field input[type="time"],
.qf-field input[type="range"],
.qf-field input[type="color"],
.qf-field select,
.qf-field textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qf-field input:focus,
.qf-field select:focus,
.qf-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.qf-field textarea {
    min-height: 120px;
    resize: vertical;
}

.qf-radio-label,
.qf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
    padding: 5px 0;
}

.qf-radio-label input,
.qf-checkbox-label input {
    width: auto !important;
    margin: 0;
}

.qf-field-submit {
    margin-top: 10px;
}

/* Base submit button */
.qf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(34, 113, 177, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.3px;
}

.qf-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.qf-submit-btn:hover {
    background: linear-gradient(135deg, #2a85d0 0%, #1a72b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 113, 177, 0.3), 0 4px 6px rgba(0, 0, 0, 0.1);
}

.qf-submit-btn:hover::before {
    left: 100%;
}

.qf-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.qf-submit-btn:disabled {
    background: linear-gradient(135deg, #c3c4c7 0%, #a7aaad 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button style variations */
.qf-btn-style-outline .qf-submit-btn,
.qf-submit-btn.qf-style-outline {
    background: transparent;
    color: #2271b1;
    border: 2px solid #2271b1;
    box-shadow: none;
}

.qf-btn-style-outline .qf-submit-btn:hover,
.qf-submit-btn.qf-style-outline:hover {
    background: #2271b1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.25);
}

.qf-btn-style-rounded .qf-submit-btn,
.qf-submit-btn.qf-style-rounded {
    border-radius: 50px;
}

.qf-btn-style-dark .qf-submit-btn,
.qf-submit-btn.qf-style-dark {
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.qf-btn-style-dark .qf-submit-btn:hover,
.qf-submit-btn.qf-style-dark:hover {
    background: linear-gradient(135deg, #2c3338 0%, #3c434a 100%);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.qf-btn-style-success .qf-submit-btn,
.qf-submit-btn.qf-style-success {
    background: linear-gradient(135deg, #00a32a 0%, #008a20 100%);
    box-shadow: 0 4px 6px rgba(0, 163, 42, 0.2);
}

.qf-btn-style-success .qf-submit-btn:hover,
.qf-submit-btn.qf-style-success:hover {
    background: linear-gradient(135deg, #00c232 0%, #00a32a 100%);
    box-shadow: 0 8px 16px rgba(0, 163, 42, 0.3);
}

.qf-btn-style-purple .qf-submit-btn,
.qf-submit-btn.qf-style-purple {
    background: linear-gradient(135deg, #7b61ff 0%, #624bff 100%);
    box-shadow: 0 4px 6px rgba(123, 97, 255, 0.2);
}

.qf-btn-style-purple .qf-submit-btn:hover,
.qf-submit-btn.qf-style-purple:hover {
    background: linear-gradient(135deg, #9580ff 0%, #7b61ff 100%);
    box-shadow: 0 8px 16px rgba(123, 97, 255, 0.3);
}

/* Step nav buttons */
.qf-step-nav .qf-next-btn,
.qf-step-nav .qf-submit-btn {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    margin-left: auto;
    width: auto;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(34, 113, 177, 0.2);
}

.qf-step-nav .qf-next-btn:hover,
.qf-step-nav .qf-submit-btn:hover {
    background: linear-gradient(135deg, #2a85d0 0%, #1a72b8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(34, 113, 177, 0.3);
}

.qf-step-nav .qf-prev-btn {
    background: #f6f7f7;
    color: #1d2327;
    border: 2px solid #c3c4c7;
    width: auto;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qf-step-nav .qf-prev-btn:hover {
    background: #e0e0e0;
    border-color: #a7aaad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.qf-step-nav .qf-prev-btn:active,
.qf-step-nav .qf-next-btn:active,
.qf-step-nav .qf-submit-btn:active {
    transform: translateY(0);
}

.qf-messages {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    border: none;
}

.qf-messages.qf-success,
.qf-messages.qf-error {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: auto;
    padding: 15px;
    border-width: 1px;
    border-style: solid;
}

.qf-messages.qf-success {
    background: #edfaef;
    border-color: #00a32a;
    color: #00a32a;
}

.qf-messages.qf-error {
    background: #fcf0f1;
    border-color: #d63638;
    color: #d63638;
}

.qf-messages ul {
    margin: 0;
    padding-left: 20px;
}

.qf-messages-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qf-messages-close:hover {
    opacity: 1;
}

.qf-messages.qf-success,
.qf-messages.qf-error {
    position: relative;
}

.qf-messages-content {
    padding-right: 20px;
}

/* Range Slider */
.qf-range-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qf-range-wrap input[type="range"] {
    flex: 1;
    padding: 8px 0;
}

.qf-range-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #2271b1;
    background: #f0f0f1;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
}

/* Color Picker */
.qf-field input[type="color"] {
    height: 44px;
    padding: 4px;
    cursor: pointer;
}

/* Multi Select */
.qf-field select[multiple] {
    min-height: 100px;
    padding: 8px;
}

.qf-field select[multiple] option {
    padding: 6px 8px;
}

/* HTML Content Block */
.qf-html-content {
    padding: 10px 0;
}

.qf-html-content p {
    margin: 0 0 10px;
}

.qf-html-content h1,
.qf-html-content h2,
.qf-html-content h3,
.qf-html-content h4 {
    margin: 0 0 10px;
}

/* Star Rating */
.qf-rating-group {
    display: flex;
    gap: 6px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.qf-rating-group .qf-rating-star {
    cursor: pointer;
    font-size: 28px;
    color: #c3c4c7;
    transition: color 0.2s;
    position: relative;
}

.qf-rating-group .qf-rating-star::before {
    content: "\2605";
}

.qf-rating-group .qf-rating-star:hover,
.qf-rating-group .qf-rating-star:hover ~ .qf-rating-star {
    color: #ffb900;
}

.qf-rating-group .qf-rating-star input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.qf-rating-group .qf-rating-star.selected,
.qf-rating-group .qf-rating-star.selected ~ .qf-rating-star {
    color: #ffb900;
}

/* reCAPTCHA & Turnstile */
.qf-captcha-wrap {
    margin: 10px 0;
}

/* Payment Fields */
.qf-payment-wrap {
    margin: 10px 0;
}

.qf-stripe-card-element {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.qf-stripe-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

.qf-paypal-button-container {
    min-height: 45px;
}

.qf-venmo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #008cff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.qf-venmo-btn:hover {
    background: #0073d1;
}

.qf-venmo-btn:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

.qf-venmo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #fff;
    color: #008cff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.qf-venmo-message {
    margin-top: 8px;
    font-size: 13px;
    color: #333;
}

/* Step Bar - Top */
.qf-step-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}

.qf-step-bar::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.qf-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 140px;
}

.qf-step-item .qf-step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #c3c4c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #646970;
    transition: all 0.3s ease;
}

.qf-step-item.active .qf-step-number {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.qf-step-item.completed .qf-step-number {
    border-color: #00a32a;
    background: #00a32a;
    color: #fff;
}

.qf-step-item .qf-step-title {
    font-size: 12px;
    color: #646970;
    text-align: center;
    font-weight: 500;
    line-height: 1.3;
}

.qf-step-item.active .qf-step-title {
    color: #2271b1;
    font-weight: 700;
}

.qf-step-item.completed .qf-step-title {
    color: #00a32a;
}

/* Multi-Step Form Styles */
.qf-steps-wrapper {
    display: flex;
    flex-direction: column;
}

.qf-step {
    display: none;
    animation: qfFadeIn 0.3s ease;
}

.qf-step.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.qf-step-progress {
    margin-top: 20px;
    margin-bottom: 10px;
}

.qf-progress-track {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.qf-progress-bar {
    height: 100%;
    background: #2271b1;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.qf-step-label {
    font-size: 13px;
    color: #646970;
    font-weight: 500;
}

.qf-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qf-step-nav .button,
.qf-step-nav .qf-submit-btn {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: background 0.2s;
}

.qf-step-nav .qf-next-btn,
.qf-step-nav .qf-submit-btn {
    background: #2271b1;
    color: #fff;
    margin-left: auto;
    width: auto;
}

.qf-step-nav .qf-prev-btn {
    background: #f6f7f7;
    color: #1d2327;
    border: 1px solid #c3c4c7;
    width: auto;
}

.qf-step-nav .qf-next-btn:hover,
.qf-step-nav .qf-submit-btn:hover {
    background: #135e96;
}

.qf-step-nav .qf-prev-btn {
    background: #f6f7f7;
    color: #1d2327;
    border: 1px solid #c3c4c7;
}

.qf-step-nav .qf-prev-btn:hover {
    background: #e0e0e0;
}

/* Multi-Page Mode */
.qf-multipage-form .qf-step {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: qfFadeIn 0.3s ease;
}

.qf-multipage-form .qf-step-bar .qf-step-item.completed .qf-step-number::after {
    content: "\2713";
}

/* Address Autocomplete */
.qf-address-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.qf-field-address {
    position: relative;
}

.qf-address-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f1;
}

.qf-address-suggestion:hover,
.qf-address-suggestion:focus {
    background: #f0f6fc;
}

.qf-address-suggestion:last-child {
    border-bottom: none;
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    .quickform-wrapper {
        padding: 10px;
    }

    .qf-form-title {
        font-size: 20px;
    }

    .qf-field input,
    .qf-field select,
    .qf-field textarea,
    .qf-field input[type="color"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }

    .qf-submit-btn {
        padding: 16px;
        font-size: 16px;
    }

    .qf-step-bar {
        margin-bottom: 16px;
    }

    .qf-step-item .qf-step-title {
        font-size: 11px;
    }

    .qf-step-item .qf-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .qf-step-bar::before {
        top: 13px;
    }
}

@media screen and (max-width: 480px) {
    .quickform-wrapper {
        padding: 5px;
    }

    .qf-field label {
        font-size: 14px;
    }

    .qf-step-item {
        max-width: 80px;
    }
}
