/* ============================================================
   WC Direct Order – wcdo-style.css
   Fidèle au design de la capture d'écran
   ============================================================ */

/* ── Wrapper général ─────────────────────────────────────── */
.wcdo-wrapper {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 28px 24px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    font-family: inherit;
}

/* ── Groupe champ ────────────────────────────────────────── */
.wcdo-field-group {
    margin-bottom: 20px;
}

.wcdo-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.wcdo-required {
    color: #e02020;
    margin-left: 3px;
}

/* ── Inputs & Select ─────────────────────────────────────── */
.wcdo-input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.wcdo-input:focus {
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.wcdo-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── Totaux ──────────────────────────────────────────────── */
.wcdo-totals {
    border-top: 1px solid #eee;
    padding-top: 14px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.wcdo-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

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

.wcdo-grand-total {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    padding-top: 10px;
}

.wcdo-total-value {
    color: #c8922a;   /* doré – identique à la capture */
    font-weight: 600;
}

.wcdo-grand-total .wcdo-total-value {
    font-size: 16px;
}

/* ── Notice ──────────────────────────────────────────────── */
.wcdo-notice {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.wcdo-notice.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.wcdo-notice.error {
    background: #fdecea;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ── Bouton اشتري الآن ──────────────────────────────────── */
.wcdo-buy-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    letter-spacing: .3px;
    transition: background .2s, transform .1s;
    direction: rtl;
}

.wcdo-buy-btn:hover {
    background: #333;
}

.wcdo-buy-btn:active {
    transform: scale(.99);
}

.wcdo-buy-btn:disabled {
    background: #888;
    cursor: not-allowed;
}

/* ── Spinner ─────────────────────────────────────────────── */
.wcdo-buy-btn.loading::after {
    content: ' ⟳';
    animation: wcdo-spin 1s linear infinite;
    display: inline-block;
}

@keyframes wcdo-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .wcdo-wrapper {
        padding: 20px 16px;
    }
}
