/**
 * QS System - Price Calculator Styles
 */

/* Fix Elementor containers breaking sticky positioning */
.elementor-widget-container,
.elementor-shortcode,
.elementor-element {
    overflow: visible !important;
}

#price-calculator {
    display: flex;
    gap: 15;
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Instrument Sans', sans-serif;
    color: #333;
}

.calc-main {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.calc-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.summary-section {
    background: #2c3e50;
    padding: 25px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.calc-section {
    margin-bottom: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.calc-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.calc-section h3 {
    color: #016AA7;
    font-size: 20px;
    margin-bottom:10px;
    padding-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

.calc-section p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.info-text {
    font-size: 14px;
    color: #666 !important;
    font-style: normal;
    margin-top: -10px;
}

/* Company Data Section */
.company-data-section .form-group.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.company-data-section .form-group.col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.company-data-section input,
.company-data-section select {
    width: 100%;
    height: 42px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.company-data-section select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.company-data-section input:focus,
.company-data-section select:focus {
    border-color: #016AA7;
    outline: none;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    padding: 3px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.checkbox-group label:hover {
    background: #eef7fd;
    border-color: #3498db;
}

.checkbox-group label.checked {
    background: #eef7fd;
    border-color: #3498db;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #3498db;
}

.checkbox-group .service-name {
    flex: 1;
    color: #666;
    font-weight: 500;
    font-size: 14px;
}

.checkbox-group .service-price {
    font-weight: 400;
    color: #999;
    margin-left: 10px;
    text-align: right;
    min-width: 90px;
}

.checkbox-group label.checked .service-price {
    font-weight: 700;
    color: #198F90;
}

/* Number Input (Section 2) */
.number-input-group {
    display: flex;
    align-items: center;
    padding: 5px;
    gap:30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.number-input-group.active {
    background: #eef7fd;
    border-color: #3498db;
}

.number-input-group label {
    flex: 1;
    font-weight: 500;
    color: #666;
}

.number-input-group input[type="number"] {
    width: 80px;
    padding: 3px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.number-input-group .price-tag {
    color: #999;
    font-weight: 400;
    text-align: right;
    min-width: 90px;
    transition: all 0.3s ease;
}

.number-input-group.active .price-tag {
    color: #198F90;
    font-weight: 700;
}

/* Discount Info */
.discount-info {
    margin-top: 15px;
    padding: 10px 10px;
    background: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    color: #D74F29;
}

/* Section Totals */
.section-totals {
    margin-top: 15px;
    padding: 15px 20px;
    background: #f0f8ff;
    border-radius: 8px;
    font-size: 15px;
}

.section-totals .total-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.section-totals .total-row.discount {
    color: #D74F29;
}

.section-totals .total-row.final {
    font-weight: 700;
    color: #016AA7;
    border-top: 1px solid #daeefc;
    padding-top: 10px;
    margin-top: 6px;
    font-size: 16px;
}

/* Summary Sidebar */
.summary-section h3 {
    color: #fff;
    border-bottom-color: #3498db;
    padding-bottom: 15px;
    margin-bottom: 20px;
    margin-top: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #3d566e;
}

.summary-label {
    color: #bdc3c7 ;
    font-size: 15px;
}

.summary-value {
    font-weight: 600;
    color: #fff;
    font-size: 15px;
}

.summary-row.total-row {
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15=px;
    border-top: 2px solid #fff;
}

.summary-row.total-row .summary-label {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.total-value {
    font-size: 20px;
    color: #2ecc71 !important;
}

/* Buttons */
.buttons-section {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buttons-section button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

#download-offer {
    background: #fff;
    color: #016AA7;
}

#download-offer:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

#apply-contract {
    background: #4AB1AF;
    color: white;
}

#apply-contract:hover {
    background: #219394;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* ========================================
   MODAL STYLES
======================================== */
.qs-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.qs-modal.active {
    display: block;
}

.qs-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.qs-modal-content {
    position: relative;
    background: #fff;
    margin: 8% auto;
    padding: 30px;
    width: 90%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.qs-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.qs-modal-close:hover {
    color: #333;
}

.qs-modal h3 {
    margin: 0 0 10px 0;
    color: #016AA7;
    font-size: 20px;
}

.qs-modal p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-inputs .input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-inputs .input-row {
    display: flex;
    gap: 15px;
}

.modal-inputs .input-row .input-group {
    flex: 1;
}

.required {
    color: #e74c3c;
}

.modal-inputs label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.modal-inputs input,
.modal-inputs textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal-inputs input:focus,
.modal-inputs textarea:focus {
    border-color: #016AA7;
    outline: none;
}

.qs-btn-modal-primary {
    width: 100%;
    padding: 14px;
    background: #016AA7;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.qs-btn-modal-primary:hover {
    background: #015a8c;
}

/* Responsive */
@media (max-width: 1024px) {
    #price-calculator {
        gap: 15px;
    }

    .calc-sidebar {
        width: 300px;
    }

    .summary-section {
        padding: 20px;
    }
}

@media (max-width: 900px) {
    #price-calculator {
        flex-direction: column;
    }

    .calc-sidebar {
        width: 100%;
        order: -1;
        /* Show summary at top on mobile */
    }

    .summary-section {
        position: relative;
        top: 0;
    }

    .calc-main {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    #price-calculator {
        gap: 10px;
    }

    .calc-main {
        padding: 15px;
    }

    .calc-section h3 {
        font-size: 18px;
    }

    .checkbox-group label {
        padding: 10px 12px;
        flex-wrap: wrap;
    }

    .checkbox-group .service-price {
        width: 100%;
        text-align: left;
        margin-top: 5px;
        margin-left: 33px;
    }

    .company-data-section .form-group.row {
        flex-direction: column;
        gap: 15px;
    }

    .number-input-group {
        flex-wrap: wrap;
    }

    .number-input-group label {
        width: 100%;
        margin-bottom: 10px;
    }

    .number-input-group .price-tag {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .section-totals {
        padding: 12px 15px;
    }

    .summary-section {
        padding: 15px;
    }

    .summary-section h3 {
        font-size: 18px;
    }

    .buttons-section button {
        padding: 12px;
        font-size: 14px;
    }

    /* Modal responsive */
    .qs-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }

    .modal-inputs .input-row {
        flex-direction: column;
        gap: 15px;
    }
}