/**
 * Rains Custom Quote Interface - Styles
 * Design fidèle au pixel près
 */

.rains-custom-quote-interface {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    color: #1a1a1a;
    line-height: 1.5;
    font-size: 16px;
}

/* Titre produit - grande taille, gras */
.rains-cq-product-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Onglets */
.rains-cq-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.rains-cq-tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 15px;
    color: #999;
    cursor: pointer;
    position: relative;
    font-family: inherit;
    transition: color 0.2s ease;
}

.rains-cq-tab:hover {
    color: #1a1a1a;
}

.rains-cq-tab.active {
    color: #1a1a1a;
    font-weight: 600;
}

.rains-cq-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #b31e28;
}

.rains-cq-tab-content {
    display: none;
    margin-bottom: 16px;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.rains-cq-tab-content.active {
    display: block;
}

/* Étapes de personnalisation - titre et contenu côte à côte */
.rains-cq-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.rains-cq-step-upload {
    flex-direction: column;
    align-items: flex-start;
}

.rains-cq-step-upload-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.rains-cq-step:last-of-type {
    border-bottom: none;
}

.rains-cq-step-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    flex-shrink: 0;
}

/* Pastilles de couleur - WooCommerce / Variation Swatches for WooCommerce */
.rains-cq-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Intégration Variation Swatches */
.rains-cq-color-swatches .variable-items-wrapper,
.rains-cq-color-swatches .variable-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rains-cq-swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.rains-cq-swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rains-cq-swatch-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.rains-cq-swatch-selected .rains-cq-swatch-circle {
    border-color: #ebd2ac;
    box-shadow: 0 0 0 1px #fff;
}

.rains-cq-swatch-label {
    font-size: 14px;
    color: #666;
}

.rains-cq-no-variations {
    font-size: 14px;
    color: #888;
}

/* Étapes avec numéro circulaire */
.rains-cq-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1px solid #1a1a1a;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    flex-shrink: 0;
}

/* Quantité - tout sur une ligne, valeur en rouge au vin */
.rains-cq-step-quantity {
    flex-wrap: nowrap;
}

.rains-cq-quantity-text {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    white-space: nowrap;
    display: inline;
}

.rains-cq-quantity-text .rains-cq-quantity-input {
    display: inline;
}

.rains-custom-quote-interface .rains-cq-quantity-input {
    width: 3ch !important;
    min-width: 3ch !important;
    max-width: 3ch !important;
    padding: 0 2px !important;
    margin: 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #b31e28;
    border: none !important;
    border-bottom: 1px solid #b31e28 !important;
    border-radius: 0;
    text-align: center;
    font-family: inherit;
    background: transparent !important;
}

.rains-cq-quantity-input:focus {
    outline: none;
    border-bottom-color: #b31e28;
}

.rains-cq-quantity-input {
    -moz-appearance: textfield;
}

.rains-cq-quantity-input::-webkit-outer-spin-button,
.rains-cq-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Upload */
.rains-cq-upload-note {
    display: inline-block;
    font-size: 13px;
    color: #1a1a1a;
    background: #f5f5f5;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
}

.rains-cq-upload-instructions {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
}

.rains-cq-upload-wrapper {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 12px;
}

.rains-cq-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Bouton upload - centré, fond clair, contour gris */
.rains-cq-upload-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.rains-cq-upload-btn:hover {
    border-color: #999;
    background: #fafafa;
}

.rains-cq-upload-btn.rains-has-file {
    border-color: #2d5016;
    color: #2d5016;
}

/* Trois colonnes : prix minimum, livraison, boutons */
.rains-cq-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin: 40px 0 0;
    padding: 32px 0 0;
    border-top: 1px solid #f0f0f0;
    align-items: start;
}

.rains-cq-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rains-cq-col-price {
    text-align: left;
}

.rains-cq-col-delivery {
    text-align: left;
}

.rains-cq-col-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.rains-cq-price-text {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.rains-cq-price-note,
.rains-cq-delivery-value {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.rains-cq-delivery-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.rains-cq-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease;
    min-width: 200px;
}

.rains-cq-btn-quote {
    background: #b31e28;
    color: #fff;
}

.rains-cq-btn-quote:hover {
    background: #8a1520;
}

.rains-cq-btn-devis {
    background: #ebd2ac;
    color: #fff;
}

.rains-cq-btn-devis:hover {
    background: #d4c099;
}

/* Responsive - colonnes empilées sur mobile */
@media (max-width: 768px) {
    .rains-cq-three-columns {
        grid-template-columns: 1fr;
    }

    .rains-cq-col-actions {
        align-items: stretch;
    }
}

/* Compatibilité Elementor Theme Builder */
.elementor-widget-rains-custom-quote .elementor-widget-container {
    overflow: visible;
}
