/* Duct Cleaning Calculator Styles - McAfee Theme Integration */

/* Import theme fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;600;700;800;900&display=swap');

/* Global text color override for popup content */
.dcc-popup,
.dcc-popup * {
    color: #333333 !important;
}

/* Specific overrides for buttons and elements that should have white text */
.dcc-popup .dcc-next-btn,
.dcc-popup .dcc-back-btn,
.dcc-popup .dcc-calculate-btn,
.dcc-popup .dcc-submit-btn,
.dcc-popup .dcc-close-btn,
.dcc-launch-button,
.dcc-popup .dcc-total,
.dcc-popup .dcc-total * {
    color: white !important;
}

/* Popup Overlay */
.dcc-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

/* Popup Container */
.dcc-popup {
    background: #ffffff;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: dccFadeIn 0.3s ease-out;
    color: #333333 !important; /* Ensure text is dark on white background */
}

/* Force select elements to have visible text */
.dcc-popup select,
.dcc-popup select:focus,
.dcc-popup select:hover,
.dcc-popup select:active {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    opacity: 1 !important;
}

@keyframes dccFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close Button */
.dcc-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(235, 28, 41, 0.1);
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #eb1c29;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: 700;
    z-index: 10;
}

.dcc-close:hover {
    background-color: #eb1c29;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Steps */
.dcc-step {
    padding: 50px 40px;
    display: none;
}

.dcc-step.active {
    display: block;
    animation: slideInFromRight 0.4s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dcc-step h2 {
    color: #000000;
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 800;
    font-family: 'Nunito', sans-serif !important;
    line-height: 1.2;
    padding-bottom: 15px;
    border-bottom: 3px solid #eb1c29;
}

.dcc-step p {
    color: #555555;
    margin-bottom: 30px;
    font-size: 18px;
    line-height: 1.6;
    font-family: 'Nunito', sans-serif;
}

/* Form Elements */
.dcc-step input[type="text"],
.dcc-step input[type="number"],
.dcc-step input[type="email"],
.dcc-step input[type="tel"],
.dcc-step select,
.dcc-step textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    background: #f8f9fa;
}

.dcc-step textarea {
    border-radius: 20px;
    min-height: 120px;
    resize: vertical;
    padding: 16px 20px;
}

.dcc-step input[type="text"]:focus,
.dcc-step input[type="number"]:focus,
.dcc-step input[type="email"]:focus,
.dcc-step input[type="tel"]:focus,
.dcc-step select:focus,
.dcc-step textarea:focus {
    border-color: #eb1c29;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(235, 28, 41, 0.1);
}

/* Select Dropdown Styling */
.dcc-step 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='%23eb1c29' 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 20px center;
    background-size: 20px;
    padding-right: 50px;
}

/* Select Options */
.dcc-step select {
    color: #333333 !important;
    background: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
}

.dcc-step select option {
    color: #333333 !important;
    background: #ffffff !important;
}

.dcc-step select:focus {
    background: #ffffff !important;
    color: #333333 !important;
    border-color: #eb1c29 !important;
}

/* Fix for returns dropdown specifically */
.dcc-select-field,
#dcc-returns {
    color: #333333 !important;
    background-color: #ffffff !important;
    font-weight: 600 !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 16px !important;
    padding: 16px 50px 16px 20px !important;
    width: 100% !important;
    height: auto !important;
    line-height: normal !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    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='%23333333' 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") !important;
    background-repeat: no-repeat !important;
    background-position: right 20px center !important;
    background-size: 20px !important;
}

#dcc-returns option {
    color: #333333 !important;
    background-color: #ffffff !important;
}

/* Checkbox Group */
.dcc-checkbox-group {
    margin-bottom: 25px;
}

.dcc-checkbox-group label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    color: #333333;
}

.dcc-checkbox-group label:hover {
    background: linear-gradient(135deg, rgba(235, 28, 41, 0.05) 0%, rgba(235, 28, 41, 0.02) 100%);
    border-color: #eb1c29;
    transform: translateX(5px);
}

.dcc-checkbox-group input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #eb1c29;
}

.dcc-checkbox-group input[type="checkbox"]:checked + label {
    background: linear-gradient(135deg, rgba(235, 28, 41, 0.1) 0%, rgba(235, 28, 41, 0.05) 100%);
    border-color: #eb1c29;
}

/* Special Input Groups */
.dcc-painted-registers,
.dcc-video-additional {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 2px solid #e0e0e0;
}

.dcc-painted-registers label,
.dcc-video-additional label {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #333333;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.dcc-painted-registers input[type="number"],
.dcc-video-additional input[type="number"] {
    width: 80px;
    margin: 0 12px;
    padding: 10px 15px;
    border-radius: 25px;
    text-align: center;
    font-weight: 700;
}

/* Buttons - McAfee Theme Style */
.dcc-next-btn,
.dcc-back-btn,
.dcc-calculate-btn,
.dcc-submit-btn,
.dcc-start-over-btn,
.dcc-close-btn {
    padding: 16px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dcc-next-btn,
.dcc-calculate-btn,
.dcc-submit-btn {
    background: linear-gradient(135deg, #eb1c29 0%, #d01520 100%);
    color: white;
}

.dcc-next-btn:hover,
.dcc-calculate-btn:hover,
.dcc-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(235, 28, 41, 0.3);
    background: linear-gradient(135deg, #d01520 0%, #eb1c29 100%);
}

.dcc-back-btn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.dcc-back-btn:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.dcc-start-over-btn {
    background: transparent;
    color: #eb1c29;
    border: 2px solid #eb1c29;
}

.dcc-start-over-btn:hover {
    background: #eb1c29;
    color: white;
    transform: translateY(-2px);
}

.dcc-close-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    display: block;
    margin: 25px auto;
}

.dcc-close-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: scale(1.05);
}

/* Launch Button - McAfee Style */
.dcc-launch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eb1c29 0%, #d01520 100%);
    color: #ffffff !important;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(235, 28, 41, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.dcc-launch-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(235, 28, 41, 0.4);
    background: linear-gradient(135deg, #d01520 0%, #eb1c29 100%);
    color: #ffffff !important;
}

/* Error Messages */
.dcc-error {
    color: #eb1c29;
    font-size: 14px;
    margin-top: -15px;
    margin-bottom: 20px;
    min-height: 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    padding: 8px 15px;
    background: rgba(235, 28, 41, 0.1);
    border-radius: 25px;
    display: none;
}

.dcc-error:not(:empty) {
    display: block;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Quote Breakdown */
.dcc-breakdown {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.dcc-line-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-family: 'Nunito', sans-serif;
}

.dcc-line-item:last-child {
    border-bottom: none;
}

.dcc-line-item span:first-child {
    color: #333333;
    flex-grow: 1;
    font-size: 16px;
    font-weight: 600;
}

.dcc-line-item span:last-child {
    color: #000000;
    font-weight: 800;
    min-width: 100px;
    text-align: right;
    font-size: 18px;
}

/* Total */
.dcc-total {
    background: linear-gradient(135deg, #eb1c29 0%, #d01520 100%);
    color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(235, 28, 41, 0.3);
}

.dcc-total h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dcc-total span {
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.dcc-total .dcc-discount-note {
    margin: 10px 0 0 0;
    font-size: 16px;
    color: #ffffff;
    opacity: 0.9;
    font-weight: 400;
    font-family: 'Nunito', sans-serif;
}

/* Coupon */
.dcc-coupon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 35px;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.dcc-coupon h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dcc-coupon span {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Contact Form */
.dcc-contact-form {
    background: linear-gradient(135deg, rgba(235, 28, 41, 0.05) 0%, rgba(235, 28, 41, 0.02) 100%);
    padding: 35px;
    border-radius: 20px;
    margin-bottom: 25px;
    border: 2px solid rgba(235, 28, 41, 0.2);
}

.dcc-contact-form h3 {
    color: #000000;
    margin-bottom: 25px;
    font-size: 26px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    text-align: center;
}

/* Success Message */
#dcc-step-7 {
    text-align: center;
    padding: 80px 40px;
}

#dcc-step-7 h2 {
    color: #27ae60;
    border-bottom: none;
    margin-bottom: 25px;
    font-size: 42px;
}

#dcc-step-7 p {
    font-size: 20px;
    color: #555555;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto;
}

/* Progress Indicator (optional enhancement) */
.dcc-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.dcc-progress-step {
    width: 40px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.dcc-progress-step.active {
    background: #eb1c29;
    transform: scaleX(1.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dcc-popup {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
        border-radius: 16px;
    }

    .dcc-step {
        padding: 35px 25px;
    }

    .dcc-step h2 {
        font-size: 26px;
    }

    .dcc-step p {
        font-size: 16px;
    }

    .dcc-next-btn,
    .dcc-back-btn,
    .dcc-calculate-btn,
    .dcc-submit-btn,
    .dcc-start-over-btn {
        display: block;
        width: 100%;
        margin: 12px 0;
    }

    .dcc-total span {
        font-size: 32px;
    }

    .dcc-painted-registers input[type="number"],
    .dcc-video-additional input[type="number"] {
        width: 60px;
    }

    .dcc-launch-button {
        padding: 16px 30px;
        font-size: 16px;
    }

    .dcc-contact-form {
        padding: 25px 20px;
    }

    #dcc-step-7 h2 {
        font-size: 32px;
    }

    .dcc-close {
        top: 10px;
        right: 10px;
    }
}

/* Smooth Scrolling */
.dcc-popup {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.dcc-popup::-webkit-scrollbar {
    width: 8px;
}

.dcc-popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dcc-popup::-webkit-scrollbar-thumb {
    background: #eb1c29;
    border-radius: 10px;
}

.dcc-popup::-webkit-scrollbar-thumb:hover {
    background: #d01520;
}

/* Loading State */
.dcc-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.dcc-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid rgba(235, 28, 41, 0.2);
    border-top: 4px solid #eb1c29;
    border-radius: 50%;
    animation: dccSpin 1s linear infinite;
}

@keyframes dccSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .dcc-popup-overlay {
        display: none !important;
    }
}