/* Style du bouton "Commander maintenant" */
.wcqo-quick-order-button {
    margin: 20px 0;
}

.wcqo-quick-order-button .button {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wcqo-quick-order-button .button:hover {
    background-color: #45a049;
}

/* Style de la modal */
.wcqo-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.wcqo-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wcqo-modal-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.wcqo-modal-close:hover {
    color: #000;
}

/* Style de la section de commande rapide */
.wcqo-quick-order-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #ffffff;
    border: solid 3px var(--wcqo-form-color, #4caf50);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wcqo-quick-order-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

/* Style du formulaire */
.wcqo-quick-order-form {
    margin-top: 20px;
    direction: rtl;
    text-align: right;
}

.wcqo-form-fields {
    margin-bottom: 20px;
}

/* Style des champs flottants */
.form-floating {
    position: relative;
    margin-bottom: 16px;
    direction: rtl;
}

.form-floating .form-control {
    width: 100%;
    height: 56px;
    padding: 1rem 0.75rem;
    font-size: 14px;
    line-height: 1.25;
    border: 1px solid #e0e0e0!important;
    border-radius: 8px!important;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    padding-right: 0.75rem;
    padding-left: 1.5rem;
} 
.form-floating label {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    height: 100%;
    padding: 0.5rem 0.75rem;
    pointer-events: none;
    transform-origin: 0 0;
    transition: opacity .15s ease-in-out, transform .15s ease-in-out;
    color: #6c757d;
    font-size: 14px;
}

.form-floating .form-control:focus,
.form-floating .form-control:not(:placeholder-shown) {
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    border-color: #4CAF50;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem);
    background: white;
    padding: 0 0.5rem;
    line-height: 14px;
    font-size: 14px;
    color: var(--wcqo-form-color, #4CAF50);
    height: auto;
    right: 0.5rem;
    left: auto;
}

.form-floating .form-control:focus {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* Style spécifique pour les select */
.form-floating select.form-control {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
    padding-right: 0.75rem;
    padding-left: 1.5rem;
}

.form-floating select.form-control ~ label {
    transform: scale(0.85) translateY(-0.5rem);
    background: white;
    padding: 0 0.5rem;
    height: auto;
    right: 0.5rem;
    left: auto;
}

/* Style du bouton Commander */
.wcqo-quick-order-form #wcqo-submit-button {
    width: 100%; 
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    background-color: var(--wcqo-button-color, #4CAF50);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.wcqo-quick-order-form #wcqo-submit-button:hover {
    background-color: var(--wcqo-button-hover-color, #45a049);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.2);
}

.wcqo-quick-order-form #wcqo-submit-button:active {
    transform: translateY(0);
}

/* Style responsive */
@media screen and (max-width: 768px) {
    .form-floating .form-control {
        height: 40px;
        font-size: 13px;
    }
    
    .form-floating label {
        font-size: 13px;
    }
    
    .wcqo-quick-order-form #wcqo-submit-button {
        padding: 14px;
        font-size: 14px;
    }
}

/* Animation des champs */
@keyframes labelFloat {
    from {
        transform: translateY(0);
        opacity: 0.5;
    }
    to {
        transform: scale(0.85) translateY(-0.5rem);
        opacity: 1;
    }
}

.form-floating .form-control:focus ~ label {
    animation: labelFloat 0.2s ease-out forwards;
}

/* Style responsive pour les champs */
@media screen and (max-width: 768px) {
    .wcqo-form-fields .form-row {
        margin-bottom: 10px;
    }
    
    .wcqo-form-fields label {
        font-size: 14px;
    }
    
    .wcqo-form-fields input,
    .wcqo-form-fields select {
        padding: 8px 12px;
        height: 40px;
        font-size: 14px;
    }

    .form-floating label {
        font-size: 14px;
        padding-right: 0.75rem;
        padding-left: 0;
    }

    .form-floating .form-control {
        height: 45px;
        font-size: 14px;
    }

    .form-floating .form-control:focus ~ label,
    .form-floating .form-control:not(:placeholder-shown) ~ label {
        right: 0.5rem;
        left: auto;
    }
}

/* Style du résumé de commande */
.wcqo-quick-order-form .wcqo-order-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--wcqo-form-color, #4caf50);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    position: relative;
    padding-top: 25px;
    direction: rtl;
    text-align: right;
}

.wcqo-quick-order-form .summary-floating-label {
    position: absolute;
    top: -10px;
    right: 10px;
    left: auto;
    background: white;
    padding: 0 8px;
    font-size: 12px;
    color: var(--wcqo-form-color, #4CAF50);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wcqo-quick-order-form .wcqo-product-details,
.wcqo-quick-order-form .wcqo-shipping-details,
.wcqo-quick-order-form .wcqo-total {
    margin-bottom: 10px;
}

.wcqo-quick-order-form .wcqo-product-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 23px;
}

.wcqo-quick-order-form .wcqo-product-info .variation {
    margin-bottom: 10px;
}

.wcqo-quick-order-form .wcqo-product-info .price,
.wcqo-quick-order-form .wcqo-shipping-info .cost,
.wcqo-quick-order-form .wcqo-total-info .total {
    font-weight: 600;
    color: #4CAF50;
}

.wcqo-quick-order-form .wcqo-total-info {
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: 10px;
}

.wcqo-quick-order-form .wcqo-total-info p {
    margin-bottom: 0;
}

.wcqo-quick-order-form .wcqo-total-info .total {
    font-size: 18px;
    color: #333;
    margin-top: 10px;
}

/* Style responsive */
@media screen and (max-width: 768px) {
    .wcqo-quick-order-section {
        padding: 15px;
    }
    
    .wcqo-quick-order-section h2 {
        font-size: 20px;
    }
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcqo-modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Style des messages d'erreur */
.error-message {
    color: #dc3545;
    font-size: 11px;
    margin-top: 4px;
    min-height: 14px;
    display: none;
    text-align: right;
    padding-right: 0.75rem;
}

.form-floating .form-control.error {
    border-color: #dc3545;
}

.form-floating .form-control.error:focus {
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

.form-floating .form-control.error ~ label {
    color: #dc3545;
}

/* Animation pour l'apparition des messages d'erreur */
@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message.show {
    display: block;
    animation: errorShake 0.4s ease-in-out;
}

/* Thème sombre */
.wcqo-theme-dark .wcqo-quick-order-section {
    background-color: #2d2d2d !important;
    border-color: var(--wcqo-form-color, #4caf50) !important;
    color: #f0f0f0 !important;
}

.wcqo-theme-dark .wcqo-quick-order-section h2 {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.wcqo-theme-dark .form-floating .form-control {
    background-color: #3d3d3d !important;
    border-color: #555 !important;
    color: #f0f0f0 !important;
}

.wcqo-theme-dark .form-floating label {
    color: #aaa !important;
}

.wcqo-theme-dark .form-floating .form-control:focus ~ label,
.wcqo-theme-dark .form-floating .form-control:not(:placeholder-shown) ~ label {
    background: #2d2d2d !important;
    color: var(--wcqo-form-color, #4CAF50) !important;
}

.wcqo-theme-dark .wcqo-order-summary {
    background-color: #3d3d3d !important;
    border-color: var(--wcqo-form-color, #4caf50) !important;
    color: #f0f0f0 !important;
}

.wcqo-theme-dark .summary-floating-label {
    background: #2d2d2d !important;
    color: var(--wcqo-form-color, #4CAF50) !important;
}

.wcqo-theme-dark .wcqo-product-info h4 {
    color: #f0f0f0 !important;
}

.wcqo-theme-dark .wcqo-total-info {
    border-top-color: #555 !important;
}

.wcqo-theme-dark .wcqo-total-info .total {
    color: #f0f0f0 !important;
}

.wcqo-theme-dark select.form-control option {
    background-color: #3d3d3d !important;
    color: #f0f0f0 !important;
}

/* Styles RTL */
.wcqo-quick-order-form .form-floating {
    direction: rtl;
}

.wcqo-quick-order-form .form-floating label {
    right: 0;
    left: auto;
    padding-right: 0.75rem;
    padding-left: 0;
}

.wcqo-quick-order-form .form-floating .form-control {
    padding-right: 0.75rem;
    padding-left: 1.5rem;
}

.wcqo-quick-order-form .form-floating .form-control:focus ~ label,
.wcqo-quick-order-form .form-floating .form-control:not(:placeholder-shown) ~ label {
    right: 0.5rem;
    left: auto;
}

.wcqo-quick-order-form .form-floating select.form-control {
    padding-right: 0.75rem;
    padding-left: 1.5rem;
}

.wcqo-quick-order-form .form-floating select.form-control ~ label {
    right: 0.5rem;
    left: auto;
}

.wcqo-quick-order-form .error-message {
    text-align: right;
    padding-right: 0.75rem;
}

.wcqo-order-summary {
    direction: rtl;
    text-align: right;
}

.wcqo-order-summary .summary-floating-label {
    right: 10px;
    left: auto;
}

.wcqo-order-summary .wcqo-product-info,
.wcqo-order-summary .wcqo-shipping-info,
.wcqo-order-summary .wcqo-total-info {
    text-align: right;
}

.wcqo-order-summary .wcqo-total-info {
    border-top: 1px solid #e9ecef;
    padding-top: 10px;
    margin-top: 10px;
}

/* Ajustements pour le thème sombre en RTL */
.wcqo-theme-dark .wcqo-quick-order-form .form-floating label {
    color: #aaa;
}

.wcqo-theme-dark .wcqo-quick-order-form .form-floating .form-control:focus ~ label,
.wcqo-theme-dark .wcqo-quick-order-form .form-floating .form-control:not(:placeholder-shown) ~ label {
    background: #2d2d2d;
    color: var(--wcqo-form-color, #4CAF50);
}

/* Ajustements responsifs pour RTL */
@media screen and (max-width: 768px) {
    .wcqo-quick-order-form .form-floating label {
        font-size: 21px;
        line-height: 29px;
        padding-right: 0.75rem;
        padding-left: 0;
    }

    .wcqo-quick-order-form .form-floating .form-control {
        height: 65px;
        font-size: 18px;
        padding-right: 0.75rem;
        padding-left: 1.5rem;
    }

    .wcqo-quick-order-form .form-floating .form-control:focus ~ label,
    .wcqo-quick-order-form .form-floating .form-control:not(:placeholder-shown) ~ label {
        font-size: 16px;
        line-height: 1.2;
        right: 0.5rem;
        left: auto;
    }

    .wcqo-quick-order-form #wcqo-submit-button {
        height: 65px;
        font-size: 20px;
        font-weight: bold;
    }

    .wcqo-order-summary {
        padding: 20px;
    }

    .wcqo-order-summary .summary-floating-label {
        font-size: 18px;
        padding: 0 10px;
    }

    .wcqo-order-summary .wcqo-product-info h4 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .wcqo-order-summary .wcqo-product-info p,
    .wcqo-order-summary .wcqo-shipping-info p,
    .wcqo-order-summary .wcqo-total-info p {
        font-size: 16px;
        margin: 8px 0;
    }

    .wcqo-order-summary .wcqo-total-info .total {
        font-size: 22px;
        margin-top: 15px;
    }

    .error-message {
        font-size: 14px;
        margin-top: 5px;
    }
}

/* Ajustements pour les champs de sélection */
@media screen and (max-width: 768px) {
    .wcqo-quick-order-form select.form-control {
        height: 65px;
        font-size: 18px;
        padding-right: 2.5rem;
        background-position: right 1rem center;
        background-size: 20px;
    }

    .wcqo-quick-order-form select.form-control ~ label {
        font-size: 21px;
        line-height: 29px;
    }
}

/* Ajustements pour le thème sombre sur mobile */
@media screen and (max-width: 768px) {
    .wcqo-theme-dark .wcqo-quick-order-form .form-floating label {
        color: #ddd;
    }

    .wcqo-theme-dark .wcqo-quick-order-form .form-control {
        background-color: #3d3d3d;
        color: #fff;
    }

    .wcqo-theme-dark .wcqo-quick-order-form .form-control:focus ~ label {
        color: var(--wcqo-form-color, #4CAF50);
    }
}

.wcqo-out-of-stock {
    color: #dc3545;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

#wcqo-submit-button.disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    cursor: not-allowed;
    opacity: 0.65;
}

.wcqo-theme-dark .wcqo-out-of-stock {
    color: #ff6b6b;
}

.wcqo-theme-dark #wcqo-submit-button.disabled {
    background-color: #495057 !important;
    border-color: #495057 !important;
} 