/* Yateer Mosquito Mesh CRM Pro1 - Front-End Styles */

.ymmcrm-quote-wrapper {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222;
}

.ymmcrm-form-title {
    text-align: center;
    margin-bottom: 4px;
    color: #c0392b;
}

.ymmcrm-powered-by {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 0 0 20px;
}

.ymmcrm-powered-by a {
    color: #c0392b;
    text-decoration: none;
    font-weight: 600;
}

.ymmcrm-powered-by a:hover {
    text-decoration: underline;
}

.ymmcrm-section-title {
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 5px;
}

.ymmcrm-field {
    margin-bottom: 15px;
}

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

.ymmcrm-field input[type="text"],
.ymmcrm-field input[type="tel"],
.ymmcrm-field input[type="number"],
.ymmcrm-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

.ymmcrm-field .required {
    color: #c0392b;
}

.ymmcrm-checkbox-field label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    margin-right: 20px;
}

/* Live Calculator */
.ymmcrm-live-calculator {
    background: #fdf2f0;
    border: 1px solid #f0d3cd;
    border-radius: 8px;
    padding: 15px 18px;
    margin: 10px 0 20px;
}

.ymmcrm-live-calculator .ymmcrm-section-title {
    margin-top: 0;
    border-bottom: 2px solid #c0392b;
    padding-bottom: 5px;
    font-size: 16px;
}

.ymmcrm-live-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.ymmcrm-live-row.ymmcrm-live-total {
    font-size: 18px;
    font-weight: 700;
    color: #c0392b;
    border-top: 1px solid #f0d3cd;
    margin-top: 6px;
    padding-top: 8px;
}

.ymmcrm-live-note {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0;
    font-style: italic;
}

.ymmcrm-measurement-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.8fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    position: relative;
}

.ymmcrm-remove-measurement {
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    align-self: center;
}

.ymmcrm-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.ymmcrm-btn-primary {
    background: #c0392b;
    color: #fff;
    width: 100%;
    margin-top: 15px;
}

.ymmcrm-btn-primary:hover {
    background: #a93226;
}

.ymmcrm-btn-secondary {
    background: #c0392b;
    color: #fff;
    margin-bottom: 15px;
}

.ymmcrm-btn-secondary:hover {
    background: #a93226;
}

#ymmcrm-form-message {
    margin-top: 10px;
    color: #c0392b;
    font-weight: 600;
}

/* Result Page */
.ymmcrm-result-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ymmcrm-result-card h2 {
    text-align: center;
    color: #c0392b;
    margin-top: 0;
}

.ymmcrm-measurement-summary {
    margin: 15px 0;
}

.ymmcrm-measurement-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ymmcrm-quote-summary {
    margin: 20px 0;
    background: #fdf2f0;
    border-radius: 8px;
    padding: 15px;
}

.ymmcrm-quote-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.ymmcrm-quote-summary-row.ymmcrm-estimated-cost {
    font-size: 22px;
    font-weight: 700;
    color: #c0392b;
    border-top: 2px solid #c0392b;
    margin-top: 8px;
    padding-top: 10px;
}

.ymmcrm-offer-section {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.ymmcrm-offer-image {
    max-width: 100%;
    border-radius: 8px;
}

.ymmcrm-offer-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    max-width: 90px;
}

.ymmcrm-offer-message {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 600;
    text-align: center;
}

.ymmcrm-cta-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.ymmcrm-cta-buttons a {
    flex: 1;
}

.ymmcrm-cta-call {
    background: #c0392b;
    color: #fff;
}

.ymmcrm-cta-call:hover {
    background: #a93226;
    color: #fff;
}

.ymmcrm-cta-whatsapp {
    background: #25D366;
    color: #fff;
}

.ymmcrm-cta-whatsapp:hover {
    background: #1ebe5d;
    color: #fff;
}

.ymmcrm-back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 600px) {
    .ymmcrm-measurement-row {
        grid-template-columns: 1fr 1fr;
    }
    .ymmcrm-remove-measurement {
        grid-column: span 2;
        width: 100%;
        border-radius: 6px;
    }
    .ymmcrm-cta-buttons {
        flex-direction: column;
    }
}

/* =========================================================
   Helper / Validation
========================================================= */
.ymmcrm-helper-text {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0;
}

.ymmcrm-field-error {
    font-size: 13px;
    color: #c0392b;
    font-weight: 600;
    margin: 6px 0 0;
}

.ymmcrm-field input.ymmcrm-input-error,
.ymmcrm-field select.ymmcrm-input-error {
    border-color: #c0392b;
    background: #fdf2f0;
}

/* =========================================================
   MODAL OVERLAY
========================================================= */
.ymmcrm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

body.ymmcrm-modal-open {
    overflow: hidden;
}

/* Modal Box */
.ymmcrm-modal-box {
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px 28px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    position: relative;
    animation: ymmcrmModalIn 0.22s ease;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Discount Banner */
.ymmcrm-modal-discount-banner {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(192,57,43,0.35);
}

/* Area Message */
.ymmcrm-modal-area-msg {
    text-align: center;
    font-size: 16px;
    color: #222;
    margin: 0 0 8px;
    line-height: 1.6;
}

.ymmcrm-modal-area-msg strong {
    display: inline-block;
    font-size: 22px;
    font-weight: 900;
    color: #c0392b;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #fdf2f0;
    padding: 4px 14px;
    border-radius: 6px;
    margin: 6px 0;
}

/* Sub-message */
.ymmcrm-modal-sub {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin: 0 0 22px;
    line-height: 1.6;
}

/* Modal fields use the same base .ymmcrm-field styles from above */
.ymmcrm-modal-box .ymmcrm-field {
    margin-bottom: 16px;
}

.ymmcrm-modal-box .ymmcrm-field input[type="text"],
.ymmcrm-modal-box .ymmcrm-field input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
}

.ymmcrm-modal-box .ymmcrm-field input.ymmcrm-input-error {
    border-color: #c0392b;
    background: #fdf2f0;
}

/* Submit button inside modal */
.ymmcrm-modal-box .ymmcrm-btn-primary {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 15px 24px;
    border-radius: 8px;
    background: #25D366;
    margin-top: 4px;
}

.ymmcrm-modal-box .ymmcrm-btn-primary:hover {
    background: #1ebe5d;
    color: #fff;
}

#ymmcrm-popup-message {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .ymmcrm-modal-box {
        padding: 24px 18px 22px;
    }
    .ymmcrm-modal-discount-banner {
        font-size: 15px;
    }
    .ymmcrm-modal-area-msg strong {
        font-size: 18px;
    }
}
