/* Brief Form - Typeform-like Styling */

.brief-form-container {
    max-width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #760d7a 0%, #581660 100%);
    color: #fff;
    position: relative;
    overflow: visible;
    border-radius: 20px;
    padding-bottom: 40px;
    z-index: 2;
    /* Force consistent color rendering on iOS */
    -webkit-color-adjust: exact;
    color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

/* Progress Bar */
.brief-form-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ac40b2;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Main Content */
.brief-form-content {
    padding: 80px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 999999;
}

/* Form Steps */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
    width: 100%;
    margin: 0 auto;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.step-content {
    text-align: center;
    padding: 60px 20px 40px 20px;
}

/* Overlay Video */

.mt-video-overlay .elementor-custom-embed-image-overlay:after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-image: linear-gradient(135deg, rgba(45, 55, 72, 0) 0%, rgb(0 0 0 / 82%) 100%);
    z-index: 98;
}

.mt-video-overlay .elementor-custom-embed-play {
    z-index: 99;
}

/* Step Titles */
.step-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: #fff !important;
    animation: fadeInUp 0.6s ease;
}

@media (max-width: 768px) {
    .step-title {
        font-size: 2rem;
    }
}

/* Field Groups */

.field-groups-container {
    display: flex;
    justify-content: center;
}

.field-group {
    animation: fadeInUp 0.6s ease 0.2s both;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Radio Options */
.radio-option {
    display: block;
    padding: 20px 30px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 500;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.radio-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ac40b2;
    transform: scale(1.02);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-option:has(input:checked) .radio-custom {
    border-color: #ac40b2;
    background: #ac40b2;
}

.radio-option:has(input:checked) .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.radio-label {
    display: block;
    margin-left: 18px;
    color: #fff;
    font-size: 16px;
}

/* Checkbox Options */
.checkbox-option {
    display: block;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
    font-weight: 500;
    flex: 1;
    margin-bottom: 0 !important;
}

.checkbox-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.checkbox-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ac40b2;
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-option:has(input:checked) .checkbox-custom {
    border-color: #ac40b2;
    background: #ac40b2;
}

.checkbox-option:has(input:checked) .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    display: block;
    margin-left: 40px;
    color: #fff;
}

/* Form Inputs */
.form-input,
.form-select {
    width: 100%;
    padding: 20px 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.form-input.error {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
    border-width: 3px;
}

/* Date Fields */
.date-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.date-field {
    text-align: left;
}

.date-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.date-field input {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    min-height: 46px;
    line-height: 1.2;
}

/* White calendar icon for date inputs */
.date-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

/* For Firefox and consistent color scheme */
.date-field input[type="date"] {
    color-scheme: light;
    /* Force consistent colors on iOS */
    -webkit-color-adjust: exact;
    color-adjust: exact;
    -webkit-appearance: none;
    appearance: none;
}

.date_not_sure {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .date-group {
        grid-template-columns: 1fr;
    }
}

/* Contact Form */
.contact-form {
    text-align: left;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
}

.input-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-row.full-width {
    grid-template-columns: 1fr;
}

.input-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .input-row {
        grid-template-columns: 1fr;
    }
}

/* Budget Slider */
.budget-slider {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 100%;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin: 20px 0;
    /* Force consistent colors on iOS */
    -webkit-color-adjust: exact;
    color-adjust: exact;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 4px 15px #361238;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ac40b2;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px #361238;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.current-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

/* Buttons */
.btn-continue,
.btn-submit,
.btn-unsure {
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-unsure {
    padding: .5rem 1rem;
}

.btn-continue,
.btn-submit {
    background: #ac40b2;
    color: #fff;
    box-shadow: 0 8px 25px #361238;
}

.btn-continue:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px #361238;
}

.btn-continue:disabled,
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-unsure {
    background: #361238;
    color: #fff;
    border: 1px solid rgb(199 176 213 / 30%);
}

.btn-unsure:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Navigation */
.brief-form-navigation {
    position: absolute;
    bottom: 0px;
    left: 0px;
    z-index: 1000;
    padding: 10px 40px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
}

.btn-previous {
    padding: 6px 12px;
    background: rgb(255 255 255 / 3%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 12px;
}

.btn-previous:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-3px);
}

/* Step Actions */
.step-actions {
    animation: fadeInUp 0.6s ease 0.4s both;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-left: 20px;
}

/* Thank You Screen */
.thank-you {
    text-align: center;
    padding: 60px 20px;
}

.thank-you-icon {
    font-size: 5rem;
    color: #ac40b2;
    margin-bottom: 2rem;
    animation: bounceIn 0.8s ease;
}

.thank-you .step-title {
    color: #ac40b2;
    margin-bottom: 1rem;
}

.thank-you p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Error Messages */
.error-message {
    background: rgba(255, 71, 87, 0.9);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: slideDown 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}



/* Responsive Design */
@media (max-width: 1024px) {
    .brief-form-content {
        padding: 100px 15px 60px;
    }

    .brief-form-navigation {
        padding: 10px 20px;
    }

    .step-content {
        padding: 40px 10px 20px 10px;
    }

    .radio-option,
    .checkbox-option {
        padding: 16px 20px;
        margin: 0;
        font-size: 1rem;
        width: 100%;
    }

    .radio-label,
    .checkbox-label {
        margin-left: 35px;
        text-align: left;
    }

    .form-input,
    .form-select {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .btn-continue,
    .btn-submit,
    .btn-unsure {
        padding: 12px 32px;
        font-size: 1rem;
        width: 100%;
    }

    .btn-previous {
        padding: 6px 20px;
        font-size: 0.9rem;
    }

    .field-group {
        flex-direction: column;
    }

    .date_not_sure {
        flex-direction: column;
        width: 100%;
    }

    .step-actions {
        justify-content: center;
        padding: 0;
    }

    .field-groups-container {
        flex-direction: column;
        gap: 20px;
    }

    .input-row,
    .input-col {
        width: 100%;
    }
}

/* Custom Multi-Select with Checkboxes */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: #fff;
    min-height: 24px;
}

.multiselect-trigger:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.multiselect-trigger.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ac40b2;
}

.multiselect-placeholder {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multiselect-placeholder.has-selections {
    color: #fff;
    font-weight: 500;
}

.multiselect-arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.multiselect-trigger.active .multiselect-arrow {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    max-height: 280px;
    overflow-y: scroll;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.multiselect-dropdown.open {
    display: block;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #333;
    margin: 0;
    min-height: auto;
    position: relative;
}

.multiselect-option:last-child {
    border-bottom: none;
}

.multiselect-option:hover {
    background: rgba(172, 64, 178, 0.1);
}

.multiselect-option input[type="checkbox"] {
    margin: 0;
    margin-right: 12px;
    position: relative;
    z-index: 1;
    /* Restore native checkbox visuals (overrides global appearance reset) */
    -webkit-appearance: checkbox;
    appearance: checkbox;
    width: auto;
    height: auto;
    accent-color: #ac40b2;
}

.multiselect-option .checkbox-custom {
    display: none;
    /* Hide the custom checkbox styling in multiselect */
}

.multiselect-option .option-text {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Scrollbar styling for dropdown */
.multiselect-dropdown::-webkit-scrollbar {
    width: 6px;
}

.multiselect-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.multiselect-dropdown::-webkit-scrollbar-thumb {
    background: rgba(172, 64, 178, 0.6);
    border-radius: 3px;
}

.multiselect-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(172, 64, 178, 0.8);
}

/* iOS Color Consistency Fixes */
:root {
    /* Define color variables for consistent rendering */
    --primary-purple: #760d7a;
    --secondary-purple: #581660;
    --accent-purple: #ac40b2;
    --dark-purple: #361238;
    color-scheme: light;
}

* {
    /* Prevent iOS Safari from adjusting colors automatically */
    -webkit-color-adjust: exact;
    color-adjust: exact;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Force consistent rendering on all webkit browsers */
.brief-form-container input,
.brief-form-container select,
.brief-form-container textarea,
.brief-form-container button {
    -webkit-color-adjust: exact;
    color-adjust: exact;
    -webkit-appearance: none;
    appearance: none;
}

/* Ensure form elements maintain consistent colors */
.brief-form-container .form-input,
.brief-form-container .form-select,
.brief-form-container .radio-option,
.brief-form-container .checkbox-option,
.brief-form-container .btn-continue,
.brief-form-container .btn-submit,
.brief-form-container .btn-unsure,
.brief-form-container .btn-previous {
    -webkit-color-adjust: exact;
    color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {

    /* iOS Safari only */
    .brief-form-container {
        background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%) !important;
        -webkit-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .progress-fill {
        background: var(--accent-purple) !important;
    }

    .radio-option:has(input:checked),
    .checkbox-option:has(input:checked) {
        border-color: var(--accent-purple) !important;
    }

    .radio-option:has(input:checked) .radio-custom,
    .checkbox-option:has(input:checked) .checkbox-custom {
        background: var(--accent-purple) !important;
        border-color: var(--accent-purple) !important;
    }

    .btn-continue,
    .btn-submit {
        background: var(--accent-purple) !important;
        box-shadow: 0 8px 25px var(--dark-purple) !important;
    }
}

/* Dark mode support - but maintain our custom colors */
@media (prefers-color-scheme: dark) {
    .brief-form-container {
        /* Keep our custom gradient instead of system dark mode */
        background: linear-gradient(135deg, var(--primary-purple) 0%, var(--secondary-purple) 100%) !important;
        -webkit-color-adjust: exact;
        color-adjust: exact;
    }
}

/* Print styles */
@media print {
    .brief-form-container {
        background: #fff !important;
        color: #000 !important;
        min-height: auto;
    }

    .brief-form-progress,
    .brief-form-navigation {
        display: none;
    }

    .form-step {
        display: block !important;
        page-break-after: always;
    }

    .form-step:last-child {
        page-break-after: auto;
    }
}
