* {
    box-sizing: border-box;
}

#cqf-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 6px;
    overflow: hidden;
}

/* ACCORDION STYLE */

/* FORM */
#cqf-form {
    padding: 0;
    margin: 0;
}

/* STEP CONTAINER - ACCORDION STYLE */
.cqf-step-container {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    background: #fff;
}

.cqf-step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 1px solid #C5D9E8;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0px 20px 0px 0px !important;
}

.cqf-step-container.active .cqf-step-header {
    background: #fff;
}

.cqf-step-header:hover {
    background: #f0f0f0;
}

.cqf-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #00428E;
    color: white;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

.cqf-step-header h3 {
    margin: 0;
    font-size: 26px !important;
    color: #8DABC4 !important;
    font-weight: 600 !important;
    flex: 1;
}

.cqf-step-header::after {
    content: '▼';
    color: #00428E;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.cqf-step-container.active .cqf-step-header::after {
    transform: rotate(-180deg);
}

.cqf-step-hint {
    display: block;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-top: 4px;
}

.cqf-step-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0;
}

.cqf-step-container.active .cqf-step-content {
    max-height: 2000px;
    padding: 30px;
}

/* LOADS SECTION */
.cqf-loads {
    margin-bottom: 20px;
}

.cqf-load-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 4px;
}

.cqf-qty-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cqf-qty {
    width: 50px;
    padding: 8px;
    border: 1px solid #C5D9E8 !important;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: #fff !important;
}

.cqf-qty-group button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    padding: 0;
}

.cqf-type {
    padding: 8px 12px;
    border: 1px solid #C5D9E8;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.cqf-container-types {
    display: flex;
    gap: 8px;
    flex: 1;
}

.cqf-ct {
    padding: 8px 16px;
    background: white;
    border: 2px solid #C5D9E8;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #627B93;
    transition: all 0.2s ease;
}

.cqf-ct:hover {
    border-color: #00428E;
    color: #00428E;
}

.cqf-ct.active {
    border-color: #00428E;
    color: #00428E;
    background: #e6eef5;
}

.cqf-add-load-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #00428E;
    text-decoration: none;
    font-size: 21px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.cqf-add-load-link:hover {
    color: #00317a;
}

/* SECTION GRID */
.cqf-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.cqf-section-left {
    flex: 1;
}

.cqf-section-right {
    flex: 0 0 200px;
}

.cqf-form-group-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

.cqf-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cqf-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cqf-form-group input,
.cqf-form-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.cqf-form-group input::placeholder,
.cqf-form-group select {
    color: #999;
}

.cqf-form-group input:focus,
.cqf-form-group select:focus {
    outline: none;
    border-color: #00428E;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

/* HELP LINK */
.cqf-help-link {
    color: #00428E;
    font-size: 12px;
    text-decoration: none;
    margin-top: 4px;
}

.cqf-help-link:hover {
    text-decoration: underline;
}

/* CHECKBOXES */
.cqf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin-bottom: 12px;
}

.cqf-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #00428E;
}

.cqf-recommended {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

/* DIVIDER */
.cqf-divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 25px 0;
}

.cqf-subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: capitalize;
}

/* SECTION BOXES */
.cqf-section-box {
    background: #fafafa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
}

.cqf-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.cqf-checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.cqf-checkboxes-group .cqf-checkbox-label:last-child {
    margin-bottom: 0;
}

.cqf-required {
    color: #00428E;
}

.cqf-notice {
    background: #f5f5f5;
    border-left: 3px solid #00428E;
    padding: 12px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    margin-top: 12px;
}

.cqf-notice p {
    margin: 6px 0;
}

.cqf-notice a {
    color: #00428E;
    text-decoration: none;
}

.cqf-notice a:hover {
    text-decoration: underline;
}

/* INLINE INPUT */
.cqf-input-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.cqf-currency-symbol {
    font-size: 14px;
    color: #666;
}

.cqf-goods-value {
    width: 150px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* FOOTER */
.cqf-step-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #C5D9E8;
}

.cqf-step-container:last-child .cqf-step-footer {
    border-top: none;
}

.cqf-step-container:not(.active) .cqf-step-footer {
    display: none;
}

.cqf-prev-btn,
.cqf-next-btn,
.cqf-submit-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cqf-prev-btn {
    background: #666;
    color: white;
}

.cqf-prev-btn:hover {
    background: #555;
}

.cqf-next-btn,
.cqf-submit-btn {
    background: #00428E;
    color: white;
}

.cqf-next-btn:hover,
.cqf-submit-btn:hover {
    background: #00317a;
}

.cqf-submit-btn {
    flex: 1;
    padding: 15px 24px;
    font-size: 14px;
}

/* TOTAL SUMMARY */
.cqf-total-summary {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
    color: #00428E;
    font-weight: 600;
}

/* MODAL POPUP */
.cqf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.cqf-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cqf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.cqf-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    z-index: 1001;
    max-height: 90vh;
    overflow-y: auto;
}

.cqf-restrictions-modal-content {
    max-width: 600px;
}

.cqf-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.cqf-restrictions-modal-content h3 {
    font-size: 22px;
}

.cqf-modal-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cqf-modal-content p:last-of-type {
    margin-bottom: 25px;
}

.cqf-restrictions-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 20px;
}

.cqf-restrictions-list li {
    padding: 8px 0;
    padding-left: 25px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    position: relative;
}

.cqf-restrictions-list li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #00428E;
    font-weight: bold;
    font-size: 16px;
}

.cqf-note {
    margin-top: 20px !important;
    padding: 12px;
    background: #e6eef5;
    border-left: 3px solid #00428E;
    border-radius: 3px;
    font-size: 13px !important;
    color: #333;
}

.cqf-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 10;
}

.cqf-modal-close:hover {
    color: #333;
}

.cqf-modal-ok-btn {
    width: 100%;
    padding: 12px 24px;
    background: #00428E;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cqf-modal-ok-btn:hover {
    background: #00317a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
@media (max-width: 768px) {
    .cqf-category-tab {
        font-size: 11px;
        padding: 12px 10px;
    }

    .cqf-category-tab svg {
        width: 16px;
        height: 16px;
    }

    .cqf-section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cqf-load-row {
        flex-wrap: wrap;
    }

    .cqf-step-content {
        margin-left: 0;
    }

    .cqf-step-badge {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .cqf-step-footer {
        flex-direction: column;
    }

    .cqf-step-footer button {
        width: 100%;
    }
}

/* PERSISTENT FOOTER */
.cqf-persistent-footer{
    margin:20px auto;
    max-width:900px;
    padding:0 20px 20px 20px;
}

.cqf-step-header h3 {
    margin: unset !important;
}

.cqf-step-container.active h3 {
    color: #373848 !important;
}

.cqf-persistent-inner{
    display:flex;
    gap:12px;
    align-items:center;
    justify-content:space-between;
    border-radius:6px;
    flex-direction: column-reverse;
}
.cqf-persistent-inner .cqf-total-summary{
    margin:0;
    padding:0;
    font-size: 20px;
    color:#00428E;
    font-weight:700;
    background: unset;
    border: unset;
}
.cqf-persistent-inner .cqf-submit-btn{
    margin:0;
    padding:10px 22px;
    width: 100%;
    font-size: 21px;
    line-height: 29px;
}

@media (max-width:600px){
    .cqf-persistent-inner{flex-direction:column;align-items:stretch}
    .cqf-persistent-inner .cqf-submit-btn{width:100%}
}
