/* DSAC Wizard Container */
.dsac-wizard {
    max-width: 800px;
    margin: 0 auto;
}

/* Step Indicators */
/* Rely on Tailwind classes in HTML for layout and styling */
.dsac-step-indicators {
    /* Custom spacing if needed, but flex layout is in HTML */
    margin-bottom: 30px;
}

/* Steps */
.dsac-step {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.4s ease-in-out;
}

.dsac-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dsac-step h3 {
    margin-top: 0;
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Layout */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

/* Form Controls - Replaces Tailwind classes to avoid square brackets in shortcodes */
.dsac-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #cbd5e1;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.dsac-input:focus {
    border-color: #0f2c4a;
    --tw-ring-color: #0f2c4a;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 0 0 0 1px var(--tw-ring-color);
}

.dsac-input::placeholder {
    color: #94a3b8;
}

/* Phone Field Specific - Robust Wrapper Approach */
.dsac-phone-wrapper {
    display: flex !important;
    align-items: center;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: all 0.2s;
    height: 46px;
    /* Explicit height to prevent collapse */
    overflow: hidden;
    /* Ensure rounded corners */
}

.dsac-phone-wrapper:focus-within {
    border-color: #0f2c4a;
    box-shadow: 0 0 0 1px #0f2c4a;
}

/* The +91 prefix */
.dsac-phone-wrapper span.dsac-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border-right: 1px solid #cbd5e1;
    padding: 0 1rem;
    height: 100%;
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    min-width: 60px;
    /* Prevent crushing */
}

/* The CF7 wrapper */
.dsac-phone-wrapper .wpcf7-form-control-wrap {
    flex: 1;
    display: flex;
    height: 100%;
}

/* The Input field */
.dsac-phone-wrapper input.dsac-input {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 1rem !important;
    box-shadow: none !important;
    /* Remove individual shadow */
    border-radius: 0 !important;
}

.dsac-phone-wrapper input.dsac-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Hide CF7 br tags */
.dsac-phone-wrapper br,
.dsac-phone-wrapper p {
    display: none !important;
}

/* File Input specific */
.dsac-file-input {
    background-color: white;
    color: #64748b;
}

/* Checkbox specific */
.dsac-checkbox {
    margin-top: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    color: #0f2c4a;
}

.dsac-checkbox:focus {
    --tw-ring-color: #0f2c4a;
}

/* Payment Section */
.dsac-payment-instructions {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.dsac-payment-grid {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.dsac-qr-block,
.dsac-bank-block {
    flex: 1;
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.dsac-qr-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.dsac-alert {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.95rem;
    color: #744210;
}

/* Navigation Buttons */
.dsac-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.dsac-btn {
    padding: 10px 25px;
    background-color: #2b6cb0;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dsac-btn:hover {
    background-color: #2c5282;
}

.dsac-btn.prev-step {
    background-color: #cbd5e0;
    color: #4a5568;
}

.dsac-btn.prev-step:hover {
    background-color: #a0aec0;
}

input[type="submit"].btn-submit {
    background-color: #38a169;
}

input[type="submit"].btn-submit:hover {
    background-color: #2f855a;
}

/* Custom Submit Button Styling */
.dsac-submit-btn {
    margin-left: auto;
    padding: 10px 32px;
    background-color: #0f2c4a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 1rem;
}

.dsac-submit-btn:hover {
    background-color: #0a4f70;
}

/* Validation Error */
.validation-error {
    border-color: #e53e3e !important;
}

.error-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .dsac-payment-grid {
        flex-direction: column;
    }
}

/* FALLBACK FOR TAILWIND UTILITIES */
/* In case the theme doesn't load Tailwind or JIT isn't running for plugin files */
.dsac-wizard .grid {
    display: grid;
    gap: 1.25rem;
    /* gap-5 */
}

.dsac-wizard .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .dsac-wizard .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dsac-wizard .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Spacing and Utilities Fallback */
.dsac-wizard .mb-2 {
    margin-bottom: 0.5rem;
}

.dsac-wizard .mb-4 {
    margin-bottom: 1rem;
}

.dsac-wizard .mb-6 {
    margin-bottom: 1.5rem;
}

.dsac-wizard .mt-10 {
    margin-top: 2.5rem;
}

.dsac-wizard .pt-6 {
    padding-top: 1.5rem;
}

.dsac-wizard .p-6 {
    padding: 1.5rem;
}

.dsac-wizard .text-center {
    text-align: center;
}

.dsac-wizard .flex {
    display: flex;
}

.dsac-wizard .justify-between {
    justify-content: space-between;
}

.dsac-wizard .justify-end {
    justify-content: flex-end;
}

.dsac-wizard .items-center {
    align-items: center;
}

.dsac-wizard .gap-2 {
    gap: 0.5rem;
}

.dsac-wizard .w-full {
    width: 100%;
}

/* CF7 Fixes */
.dsac-wizard br {
    display: none;
}

.dsac-wizard p {
    margin: 0;
}