/* ============================================================
 *  Cotizador Pines o Pins — Frontend Form Styles
 * ============================================================ */

/* ── Base container ────────────────────────────── */
.pop-cotizador-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem 2rem 2.5rem;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(44, 62, 107, .08);
}

.pop-cotizador-form *,
.pop-cotizador-form *::before,
.pop-cotizador-form *::after {
    box-sizing: border-box;
}

/* ── Title ─────────────────────────────────────── */
.pop-form-title {
    text-align: center;
    color: #2c3e6b;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.75rem;
}

/* ── Sections ──────────────────────────────────── */
.pop-form-section {
    margin-bottom: 1.25rem;
}

/* ── Labels ────────────────────────────────────── */
.pop-label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 600;
    font-size: .9rem;
    color: #2c3e6b;
}

.pop-label small {
    font-weight: 400;
    color: #888;
}

.pop-required {
    color: #e74c3c;
}

/* ── Text inputs ───────────────────────────────── */
.pop-input {
    width: 100%;
    padding: .7rem 1rem;
    font-size: .95rem;
    font-family: inherit;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
    background: #fafbfc;
}

.pop-input:focus {
    border-color: #5b6abf;
    box-shadow: 0 0 0 3px rgba(91, 106, 191, .12);
    background: #fff;
}

.pop-input::placeholder {
    color: #b0b5c0;
}

/* ── Size selector ─────────────────────────────── */
.pop-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.pop-size-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.pop-size-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pop-size-btn {
    display: inline-block;
    padding: .5rem 1.2rem;
    font-size: .9rem;
    font-weight: 600;
    color: #5b6abf;
    background: #f0f2ff;
    border: 2px solid #dde1e7;
    border-radius: 999px;
    transition: all .2s ease;
    user-select: none;
}

.pop-size-radio:checked + .pop-size-btn {
    background: #5b6abf;
    color: #fff;
    border-color: #5b6abf;
    box-shadow: 0 2px 8px rgba(91, 106, 191, .3);
}

.pop-size-option:hover .pop-size-btn {
    border-color: #5b6abf;
}

.pop-recommended {
    display: block;
    margin-top: .25rem;
    font-size: .7rem;
    font-weight: 600;
    color: #e67e22;
    text-align: center;
}

/* ── Volume message ────────────────────────────── */
.pop-volume-msg {
    margin-top: .4rem;
    font-size: .82rem;
    color: #666;
    min-height: 1.25rem;
}

/* ── Price preview box ─────────────────────────── */
.pop-price-preview {
    background: linear-gradient(135deg, #f0f2ff 0%, #e8eaff 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.pop-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    font-size: .9rem;
    color: #444;
}

.pop-price-row span:last-child {
    font-weight: 600;
    color: #2c3e6b;
}

.pop-price-total {
    border-top: 2px solid rgba(91, 106, 191, .2);
    margin-top: .35rem;
    padding-top: .6rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.pop-price-total span:last-child {
    font-size: 1.15rem;
    color: #5b6abf;
}

.pop-price-deposit {
    font-size: .85rem;
    color: #777;
}

.pop-price-deposit span:last-child {
    color: #888;
}

.pop-shipping-free {
    color: #27ae60 !important;
    font-weight: 700 !important;
}

/* ── Upload area ───────────────────────────────── */
.pop-upload-area {
    display: block;
    border: 2px dashed #c5cad3;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
    background: #fafbfc;
    position: relative;
}

.pop-upload-area:hover,
.pop-upload-area.pop-drag-over {
    border-color: #5b6abf;
    background: #f0f2ff;
}

.pop-upload-placeholder p {
    margin: .5rem 0 .25rem;
    font-size: .9rem;
    color: #555;
}

.pop-upload-placeholder small {
    color: #999;
    font-size: .78rem;
}

.pop-upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.pop-upload-preview img {
    max-width: 200px;
    max-height: 160px;
    border-radius: 8px;
    object-fit: contain;
}

#pop-preview-filename {
    font-size: .85rem;
    color: #555;
    word-break: break-all;
}

.pop-remove-file {
    background: none;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: .3rem .8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .8rem;
    font-family: inherit;
    transition: all .2s ease;
}

.pop-remove-file:hover {
    background: #e74c3c;
    color: #fff;
}

/* ── Submit button ─────────────────────────────── */
.pop-submit-btn {
    display: block;
    width: 100%;
    padding: .85rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: linear-gradient(135deg, #5b6abf 0%, #7b68ee 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    margin-top: .5rem;
}

.pop-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 106, 191, .35);
}

.pop-submit-btn:active {
    transform: translateY(0);
}

.pop-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Spinner ───────────────────────────────────── */
.pop-spinner {
    margin: 1rem auto 0;
    width: 36px;
    height: 36px;
    border: 4px solid #dde1e7;
    border-top-color: #5b6abf;
    border-radius: 50%;
    animation: pop-spin .7s linear infinite;
}

@keyframes pop-spin {
    to { transform: rotate(360deg); }
}

/* ── Messages ──────────────────────────────────── */
#pop-form-message {
    margin-top: 1rem;
    padding: .8rem 1rem;
    border-radius: 8px;
    font-size: .9rem;
    text-align: center;
    line-height: 1.4;
}

#pop-form-message.pop-msg-success {
    background: #eafaf1;
    color: #1e7e34;
    border: 1px solid #a3d9a5;
}

#pop-form-message.pop-msg-error {
    background: #fdf0ef;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

/* ── Error state (shortcode) ───────────────────── */
.pop-error {
    background: #fdf0ef;
    color: #c0392b;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* ── Field validation states ───────────────────── */
.pop-input.pop-field-error,
.pop-dark-input.pop-field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .12) !important;
}

.pop-input.pop-field-valid,
.pop-dark-input.pop-field-valid {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, .12) !important;
}

.pop-field-hint {
    display: block;
    margin-top: .3rem;
    font-size: .78rem;
    line-height: 1.3;
    min-height: 1rem;
}

.pop-field-hint-error {
    color: #e74c3c;
}

.pop-field-hint-valid {
    color: #27ae60;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
    .pop-cotizador-form {
        margin: 1rem;
        padding: 1.25rem;
    }

    .pop-form-title {
        font-size: 1.25rem;
    }

    .pop-sizes {
        flex-direction: column;
    }

    .pop-size-option {
        flex-direction: row;
        gap: .5rem;
    }

    .pop-size-btn {
        flex: 1;
        text-align: center;
    }

    .pop-recommended {
        margin-top: 0;
    }

    .pop-price-preview {
        padding: 1rem;
    }
}
