.wdc-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.wdc-modal-visible {
    display: block !important;
}

.wdc-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.wdc-modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.wdc-modal-close:hover {
    color: #666;
}

.wdc-calculator {
    padding: 20px;
}

.wdc-field {
    margin-bottom: 20px;
}

.wdc-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wdc-field input[type="number"],
.wdc-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wdc-input,
select.wdc-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s ease;
}

.wdc-input:focus,
select.wdc-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

select.wdc-input {
    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='currentColor' 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 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.wdc-calculate-button {
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.wdc-calculate-button:hover {
    background-color: #005177;
}

.wdc-calculate-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.wdc-results {
    margin-top: 30px;
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.wdc-results h3 {
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
}

.wdc-result-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

.wdc-result-item:hover {
    background-color: #f0f1f2;
}

.wdc-result-label {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wdc-result-label strong {
    display: block;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 4px;
}

.wdc-description {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.wdc-result-value {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    text-align: right;
    white-space: nowrap;
}

.wdc-result-item-total {
    margin-top: 30px;
    background-color: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 20px;
}

.wdc-result-item-total .wdc-result-label strong {
    font-size: 16px;
    color: #2271b1;
}

.wdc-result-item-total .wdc-result-value {
    font-size: 16px;
    font-weight: 700;
}

.wdc-addon-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-left: 20px;
    font-size: 0.95em;
    color: #555;
}

.wdc-total-addon-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-weight: bold;
}

.wdc-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.wdc-download-pdf {
    margin-top: 15px;
    width: 100%;
    background-color: #2271b1;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.wdc-download-pdf:hover {
    background-color: #135e96;
}

.wdc-upsells {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.wdc-upsell-options {
    margin-top: 10px;
}

.wdc-upsell-option {
    margin-bottom: 10px;
}

.wdc-upsell-option:last-child {
    margin-bottom: 0;
}

.wdc-upsell-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.wdc-upsell-option input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

.wdc-addon-item {
    margin: 10px 0;
    display: flex;
    align-items: flex-start;
}

.wdc-addon-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
}

.wdc-addon-description {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

#wdc-quote-form .wdc-field {
    margin-bottom: 15px;
}

#wdc-quote-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#wdc-quote-form input[type="text"],
#wdc-quote-form input[type="email"],
#wdc-quote-form input[type="tel"],
#wdc-quote-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#wdc-quote-form textarea {
    height: 100px;
    resize: vertical;
}

.wdc-create-quote-button {
    margin-top: 20px !important;
    display: inline-block;
}

.wdc-success-message {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.wdc-success-message a {
    color: #2b542c;
    text-decoration: underline;
}

.wdc-quote-form button[type="submit"] {
    margin-top: 15px;
    width: 100%;
}

.wdc-quote-success {
    text-align: center;
    padding: 20px;
}

.wdc-quote-success h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.wdc-quote-link {
    margin: 20px 0;
}

.wdc-quote-link a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.wdc-quote-link a:hover {
    background-color: #005177;
    color: white;
}

.wdc-modal-close {
    color: black;
    border: none;
    cursor: pointer;
}

/* Quote post type styles */
.post-type-wdc_quote .inside {
    margin-top: 15px;
}

.quote-header,
.quote-contact,
.quote-calculation,
.quote-terms {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.quote-header h2 {
    margin-top: 0;
    color: #23282d;
}

.quote-contact h3,
.quote-calculation h3,
.quote-terms h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.quote-calculation .wdc-result-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.quote-terms p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Ensure modal is above everything */
#wdc-quote-modal {
    z-index: 999999 !important; /* Higher than calculator modal */
    position: fixed !important;
    background-color: rgba(0,0,0,0.5);
}

#wdc-calculator-modal {
    z-index: 99998; /* Lower than quote modal */
}

/* Ensure quote modal content stays on top */
#wdc-quote-modal .wdc-modal-content {
    position: relative;
    z-index: 1000000 !important;
    margin: 30px auto;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Modal scrolling */
.wdc-modal {
    padding: 20px 0;
}

@media (max-width: 768px) {
    .wdc-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .wdc-result-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .wdc-result-value {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .wdc-result-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .wdc-result-value {
        text-align: left;
    }
}

/* Quote Display Styles */
.wdc-quote-details {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.8;
}

.wdc-quote-section {
    margin-bottom: 50px;
    padding: 0;
    background: transparent;
    border: none;
}

.wdc-quote-section:last-child {
    margin-bottom: 0;
}

.wdc-quote-header {
    text-align: center;
    padding-bottom: 40px;
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
}

.wdc-quote-header h1 {
    color: #333;
    font-size: 28px;
    margin: 0 0 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quote-date {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

.wdc-quote-section h2 {
    color: #333;
    font-size: 16px;
    margin: 0 0 25px;
    padding: 0;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.info-block {
    line-height: 1.8;
    color: #333;
}

.info-block p {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

/* Device Summary Styles */
.summary-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.summary-item {
    background: transparent;
    padding: 0;
    border: none;
}

.summary-item h3 {
    color: #666;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
}

.summary-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

.summary-item .description {
    color: #666;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Calculation Styles */
.calculation-block {
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    border: none;
}

.calculation-block:last-child {
    margin-bottom: 0;
}

.calculation-block h3 {
    color: #333;
    font-size: 16px;
    margin: 0 0 20px;
    padding: 0;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.calculation-block h4 {
    color: #666;
    font-size: 14px;
    margin: 25px 0 15px;
    font-weight: 500;
}

.calculation-block h5 {
    color: #666;
    font-size: 14px;
    margin: 20px 0 10px;
    font-weight: 500;
}

.calculation-block ul {
    margin: 0 0 20px;
    padding-left: 20px;
    list-style-type: none;
}

.calculation-block li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
}

.calculation-block .note {
    color: #666;
    margin: 10px 0 0;
    font-size: 14px;
    font-style: normal;
}

/* Payment Structure Styles */
.payment-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.payment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.payment-item strong {
    color: #333;
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Payment Summary Styles */
.payment-summary {
    margin-top: 25px;
}

.summary-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .label h4 {
    color: #666;
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 500;
}

.summary-row .label p {
    color: #666;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
}

.summary-row .amount {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    white-space: nowrap;
    align-self: center;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Terms and Conditions Styles */
.wdc-terms {
    background: transparent;
    border: none;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.wdc-terms h2 {
    color: #333;
}

.wdc-terms ol {
    margin: 0;
    padding-left: 20px;
}

.wdc-terms li {
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 14px;
}

.wdc-terms li:last-child {
    margin-bottom: 0;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .wdc-quote-details {
        padding: 30px 20px;
        margin: 20px auto;
    }
    
    .wdc-quote-section {
        margin-bottom: 40px;
    }
    
    .wdc-quote-header {
        padding-bottom: 30px;
        margin-bottom: 40px;
    }
    
    .wdc-quote-header h1 {
        font-size: 24px;
    }
    
    .summary-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .summary-row .amount {
        text-align: left;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .wdc-quote-details,
    .wdc-quote-details * {
        visibility: visible;
    }
    .wdc-quote-details {
        position: absolute;
        left: 0;
        top: 0;
    }
}

/* Quote Container Styles */
.quote-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #fff;
    line-height: 1.6;
}

.quote-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 4px;
}

.quote-section h2 {
    color: #333;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-transform: uppercase;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.quote-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Table Styles */
.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: #fff;
}

.quote-table th,
.quote-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.quote-table th {
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
    width: 30%;
}

/* Explanation Box Styles */
.explanation-box {
    background: #fff;
    padding: 25px;
    margin: 15px 0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.explanation-box h3 {
    color: #333;
    margin: 25px 0 15px;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.explanation-box h3:first-child {
    margin-top: 0;
}

.explanation-box ul,
.explanation-box ol {
    margin: 0 0 20px 25px;
}

.explanation-box li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.explanation-box ul ul,
.explanation-box ol ul,
.explanation-box ul ol,
.explanation-box ol ol {
    margin-top: 10px;
    margin-bottom: 10px;
}

.explanation {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Additional Styles */
.section-explanation {
    color: #666;
    font-style: italic;
    margin: 10px 0 20px;
}

.note {
    font-style: italic;
    color: #666;
    margin: 15px 0;
    padding-left: 15px;
    border-left: 3px solid #ddd;
}

em {
    color: #666;
    font-style: italic;
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

/* Hide Header and Footer only on quote pages */
.single-wdc_quote .elementor-location-header,
.single-wdc_quote .elementor-location-footer {
    display: none !important;
}

/* Terms and Conditions Section */
.quote-section:last-child p {
    margin-bottom: 10px;
    padding-left: 20px;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .quote-container,
    .quote-container * {
        visibility: visible;
    }
    .quote-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
    }
    .quote-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .quote-container {
        padding: 15px;
    }
    
    .quote-section {
        padding: 15px;
    }
    
    .quote-table th,
    .quote-table td {
        padding: 10px;
    }
    
    .explanation-box {
        padding: 15px;
    }
}

/* Edit Quote Styles */
.wdc-edit-quote-wrapper {
    margin-bottom: 2em;
    text-align: right;
}

.wdc-edit-quote-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.wdc-edit-quote-button:hover {
    background-color: #005177;
}

.wdc-calculator-section,
.wdc-details-section {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.wdc-edit-quote-container h3 {
    margin-top: 0;
    color: #23282d;
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#wdc-edit-quote-modal .wdc-modal-content {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
}

.wdc-modal input[type="number"] {
    height: 39px;
    background: white !important;
    border: 1px solid #dddddd !important;
    border-radius: 5px !important;
    color: black !important;
    font-weight: 400 !important;
    padding: 10px 10px !important;
}

#wdc-edit-quote-modal .wdc-calculator-section {
    margin: 0;
}

.wdc_quote-template-default h1.entry-title {
    color: black;
}

.wdc-section-label {
    font-weight: 900 !important;
}