/* ── Custom Quote Form Styles ── */

.cqf-outer {
    background-color: #cc0000;
    padding: 24px;
    border-radius: 12px;
    margin: 0 auto;
    box-sizing: border-box;
}

.cqf-inner {
    background: #fff;
    border-radius: 10px;
    padding: 28px 28px 20px;
    box-sizing: border-box;
}

.cqf-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111 !important;
    margin: 0 0 20px;
}

.cqf-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111 !important;
    margin: 18px 0 10px;
    border: none;
    padding: 0;
}

/* ── Grid rows ── */
.cqf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.cqf-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ── Fields ── */
.cqf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cqf-field-full {
    margin-bottom: 14px;
}

.cqf-field label,
.cqf-label-block {
    font-size: 0.82rem;
    font-weight: 600;
    color: #333;
}

.cqf-req {
    color: #cc0000;
}

/* ── Inputs, selects, textarea ── */
.cqf-form input[type="text"],
.cqf-form input[type="email"],
.cqf-form input[type="tel"],
.cqf-form select,
.cqf-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #f5f5f5;
    font-size: 0.88rem;
    color: #333;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.cqf-form input:focus,
.cqf-form select:focus,
.cqf-form textarea:focus {
    border-color: #cc0000;
    background: #fff;
}

.cqf-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}

.cqf-form select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cqf-form textarea {
    resize: vertical;
    min-height: 90px;
}


/* ── Custom searchable dropdown ── */
.cqf-select {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.cqf-select__trigger {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #f5f5f5;
    overflow: hidden;
    transition: border-color 0.2s;
}

.cqf-select.cqf-select--open .cqf-select__trigger,
.cqf-select__trigger:focus-within {
    border-color: #4a90d9;
    background: #fff;
}

.cqf-select--error .cqf-select__trigger {
    border-color: #cc0000 !important;
}

.cqf-select__search {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    color: #333 !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.cqf-select__search::placeholder {
    color: #aaa;
}

.cqf-select__search:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.cqf-select__clear {
    width: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 10px 0;
    user-select: none;
    transition: color 0.15s;
}

.cqf-select__clear:hover {
    color: #cc0000;
}

.cqf-select__arrow {
    width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.75rem;
    cursor: pointer;
    border-left: 1.5px solid #e0e0e0;
    height: 100%;
    padding: 10px 0;
    user-select: none;
}

.cqf-select__arrow::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
    transform: rotate(45deg) translateY(-3px);
    transition: transform 0.2s;
}

.cqf-select.cqf-select--open .cqf-select__arrow::after {
    transform: rotate(-135deg) translateY(-3px);
}

.cqf-select__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    z-index: 9999;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
    margin: 0;
    list-style: none;
}

.cqf-select__item {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: #222;
    cursor: pointer;
    transition: background 0.15s;
}

.cqf-select__item:hover,
.cqf-select__item--focused {
    background: #ddeeff;
}

.cqf-select__item--hidden {
    display: none;
}

.cqf-select__no-results {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #999;
}

.cqf-select--disabled {
    pointer-events: none;
    opacity: 0.55;
}

/* ── Error states ── */
.cqf-input-error {
    border-color: #cc0000 !important;
}

.cqf-field-error {
    font-size: 0.76rem;
    color: #cc0000;
    margin-top: 2px;
}

.cqf-error-banner {
    background: #fdecea;
    border: 1px solid #cc0000;
    color: #cc0000;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ── Checkboxes ── */
.cqf-checkboxes {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.cqf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.88rem;
    color: #333;
    cursor: pointer;
    font-weight: 400;
}

.cqf-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #cc0000;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Submit ── */
.cqf-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.cqf-submit-btn {
    background: #cc0000;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 11px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.cqf-submit-btn:hover {
    background: #a80000;
}

/* ── Success message ── */
.cqf-success {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 20px;
}
.cqf-success p {
    margin-bottom: 0px !important;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .cqf-outer {
        padding: 14px;
    }

    .cqf-inner {
        padding: 18px 16px 16px;
    }

    .cqf-row,
    .cqf-row-3 {
        grid-template-columns: 1fr;
    }
}
