/**
 *  Quote Forms & Modal Stylesheet (Centralized)
 * @package Dagasco
 */

/* ==========================================================================
   Section & Grid Layout (Clean responsive layout without rogue !important)
   ========================================================================== */
.dagasco-b2b-section {
    width: 100%;
    background-color: #0B2348;
    color: #ffffff;
    padding-top: 24px;
    padding-bottom: 40px;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .dagasco-b2b-section {
        padding-top: 32px;
        padding-bottom: 56px;
    }
}

.dagasco-b2b-form-wrapper {
    display: block;
    width: 100%;
}

@media (min-width: 768px) {
    .dagasco-b2b-form-wrapper {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
        align-items: center;
    }
}

@media (min-width: 1024px) {
    .dagasco-b2b-form-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px;
    }
}

/* Left Column: CTA & 3 Direct Contact Cards */
.dagasco-b2b-info-col {
    display: none;
}

@media (min-width: 768px) {
    .dagasco-b2b-info-col {
        display: block;
    }
}

/* Right Column: Form Card */
.dagasco-b2b-form-col {
    width: 100%;
}

.dagasco-b2b-form-card {
    background-color: #ffffff;
    color: #0f172a;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .dagasco-b2b-form-card {
        border-radius: 24px;
        padding: 28px 32px;
    }
}

/* 2 Textfields per Row on all screen widths */
.dagasco-form-row-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    .dagasco-form-row-2col {
        gap: 16px;
    }
}

/* ==========================================================================
   Form Controls & Elements (Zero !important declarations)
   ========================================================================== */
.dagasco-form-input {
    width: 100%;
    font-size: 13px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background-color: #fbfdff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    outline: none;
    box-sizing: border-box;
    display: block;
    margin: 0;
}

@media (min-width: 640px) {
    .dagasco-form-input {
        font-size: 14px;
        padding: 12px 14px;
    }
}

.dagasco-form-input:focus {
    border-color: #0284c7;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.dagasco-form-input.is-invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.dagasco-form-error {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
    font-weight: 600;
    line-height: 1.3;
}

.dagasco-form-error.is-visible {
    display: block;
}

.dagasco-required-star {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}

.dagasco-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #0a4d94 0%, #0284c7 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.22);
    display: block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.dagasco-submit-btn:hover {
    background: linear-gradient(135deg, #083b76 0%, #0369a1 100%);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.3);
    transform: translateY(-1px);
    color: #ffffff;
}

.dagasco-submit-btn:active {
    transform: translateY(0);
}

.dagasco-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.dagasco-success-alert {
    display: none;
    padding: 16px 20px;
    border-radius: 10px;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.dagasco-success-alert.is-visible {
    display: block;
    animation: dagascoFadeInDown 0.3s ease;
}

.dagasco-quote-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px;
    border-radius: 14px;
    background: #eef6ff;
    border: 1px solid #dbeafe;
}

.dagasco-quote-tab {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #41516a;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.dagasco-quote-tab.is-active {
    background: #ffffff;
    border-color: #7dd3fc;
    color: #075985;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.12);
}

.dagasco-quote-tab:focus-visible {
    outline: 3px solid rgba(2, 132, 199, 0.25);
    outline-offset: 2px;
}

@keyframes dagascoFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

/* Modal Overlay & Box */
.dagasco-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.dagasco-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.dagasco-modal-box {
    background-color: #ffffff;
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 26px 54px -18px rgba(15, 23, 42, 0.45);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s ease-in-out;
}

.dagasco-modal-header {
    position: relative;
    padding: 22px 64px 18px 24px;
    background: #ffffff;
    border-bottom: 1px solid #dbe7f1;
    border-radius: 16px 16px 0 0;
}

.dagasco-modal-title {
    margin: 0;
    color: #0b2d63;
    font-family: var(--font-manrope, Arial, sans-serif);
    font-size: 21px;
    font-weight: 850;
    line-height: 1.25;
}

.dagasco-modal-subtitle {
    max-width: 590px;
    margin: 5px 0 0;
    color: #5a6b80;
    font-size: 12px;
    line-height: 1.5;
}

.dagasco-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border: 1px solid #d9e5ef;
    border-radius: 50%;
    background: #f3f7fb;
    color: #40536b;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dagasco-modal-close:hover {
    color: #0a4d94;
    background: #e9f4fd;
    border-color: #a9cce9;
}

.dagasco-modal-body {
    padding: 20px 24px 24px;
    background: #f7fafc;
}

.dagasco-modal-overlay.active .dagasco-modal-box {
    transform: scale(1);
}

body.dagasco-modal-open #dagasco-floating-hub {
    display: none !important;
}

.dagasco-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #f7fafc;
    padding: 12px 0 16px;
    border-top: 1px solid #dbe7f1;
}

.dagasco-turnstile-error {
    color: #b91c1c;
    font-size: 13px;
    margin: 4px 0 0;
}

.dagasco-turnstile-error[hidden] {
    display: none;
}

@media (max-width: 1023px) {
    .dagasco-gallery-img-wrap {
        aspect-ratio: auto;
        height: min(72vw, 320px);
    }
}

@media (max-width: 640px) {
    .dagasco-modal-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    .dagasco-modal-box {
        max-height: 92vh;
        border-radius: 16px 16px 10px 10px;
    }

    .dagasco-quote-tab {
        font-size: 12px;
        padding: 9px 8px;
    }

    .dagasco-modal-header {
        padding: 18px 54px 15px 18px;
    }

    .dagasco-modal-title {
        font-size: 18px;
    }

    .dagasco-modal-body {
        padding: 16px;
    }

}
