/* Direct Order Form – Pro Front-end Styles with CSS Variables */

:root {
    --dof-btn-bg: #388e3c;
    --dof-btn-hover-bg: #2e7d32;
    --dof-btn-color: #ffffff;
    --dof-btn-radius: 50px;
    --dof-btn-font-size: 18px;
    --dof-form-bg: #f9f9f9;
    --dof-form-radius: 10px;
    --dof-field-bg: #ffffff;
    --dof-field-border: #dddddd;
    --dof-field-focus: #1976d2;
    --dof-field-radius: 8px;
    --dof-float-bg: #ff5722;
    --dof-float-color: #ffffff;
    --dof-float-radius: 50px;
}

/* Main Container */
.dof-order-section {
    padding: 10px 0;
    max-width: 100%;
}

.dof-order-section.dof-rtl {
    direction: rtl;
    text-align: right;
}

/* Badges */
.dof-badge {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    line-height: 1.7;
    font-size: 15px;
    position: relative;
}

.dof-badge strong {
    font-weight: 700;
}

/* Badge Variants – Default Theme */
.dof-badges-default .dof-badge-inspection {
    background: #e1f5fe;
    color: #01579b;
    border-left: 4px solid #0288d1;
    font-weight: 600;
}
.dof-badges-default .dof-badge-offer {
    background: #fff8e1;
    border-left: 5px solid #ff9800;
    color: #333;
}
.dof-badges-default .dof-badge-cta {
    background: #e3f2fd;
    border-left: 5px solid #1976d2;
    color: #0d47a1;
}
.dof-badges-default .dof-badge-why {
    background: #fff3e0;
    border-left: 5px solid #fb8c00;
    color: #e65100;
}
.dof-badges-default .dof-badge-guarantee {
    background: #e8f5e9;
    border-left: 5px solid #43a047;
    color: #1b5e20;
}

/* Badge Variants – Minimal Theme */
.dof-badges-minimal .dof-badge {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    color: #333;
}

/* Badge Variants – Dark Theme */
.dof-badges-dark .dof-badge {
    background: #1e1e2e;
    color: #e0e0e0;
    border-left: 4px solid #6366f1;
}

/* RTL Badge Borders */
.dof-rtl .dof-badge {
    border-left: none !important;
}
.dof-rtl.dof-badges-default .dof-badge-inspection { border-right: 4px solid #0288d1; }
.dof-rtl.dof-badges-default .dof-badge-offer { border-right: 5px solid #ff9800; }
.dof-rtl.dof-badges-default .dof-badge-cta { border-right: 5px solid #1976d2; }
.dof-rtl.dof-badges-default .dof-badge-why { border-right: 5px solid #fb8c00; }
.dof-rtl.dof-badges-default .dof-badge-guarantee { border-right: 5px solid #43a047; }
.dof-rtl.dof-badges-dark .dof-badge { border-left: none; border-right: 4px solid #6366f1; }

/* Price Area */
.dof-offer-label {
    font-size: 20px;
    font-weight: 700;
    color: #d84315;
}
.dof-price {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}
.dof-regular-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 6px;
}
.dof-rtl .dof-regular-price {
    margin-left: 0;
    margin-right: 6px;
}
.dof-shipping-info {
    color: #555;
    font-size: 14px;
}

/* Form Wrapper */
.dof-form-wrapper {
    padding: 18px;
    background: var(--dof-form-bg);
    border-radius: var(--dof-form-radius);
    margin-bottom: 15px;
}

/* Form Fields */
.dof-field {
    margin-bottom: 14px;
}
.dof-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}
.dof-field input[type="text"],
.dof-field input[type="tel"],
.dof-field input[type="email"],
.dof-field input[type="number"],
.dof-field textarea,
.dof-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--dof-field-border);
    border-radius: var(--dof-field-radius);
    font-size: 15px;
    background: var(--dof-field-bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.dof-field textarea {
    min-height: 70px;
    resize: vertical;
}
.dof-rtl .dof-field input,
.dof-rtl .dof-field textarea,
.dof-rtl .dof-field select {
    direction: rtl;
    text-align: right;
}
.dof-field input:focus,
.dof-field textarea:focus,
.dof-field select:focus {
    border-color: var(--dof-field-focus);
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.08);
}
.dof-field input.dof-invalid,
.dof-field textarea.dof-invalid {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.08);
}
.dof-required-star {
    color: #d32f2f;
    margin-left: 2px;
}

/* Quantity Selector */
.dof-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 140px;
}
.dof-qty-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid var(--dof-field-border);
    background: var(--dof-field-bg);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    user-select: none;
    color: #333;
}
.dof-qty-btn:hover {
    background: #f0f0f0;
}
.dof-qty-btn.dof-qty-minus {
    border-radius: var(--dof-field-radius) 0 0 var(--dof-field-radius);
    border-right: none;
}
.dof-qty-btn.dof-qty-plus {
    border-radius: 0 var(--dof-field-radius) var(--dof-field-radius) 0;
    border-left: none;
}
.dof-rtl .dof-qty-btn.dof-qty-minus {
    border-radius: 0 var(--dof-field-radius) var(--dof-field-radius) 0;
    border-left: none;
    border-right: 1.5px solid var(--dof-field-border);
}
.dof-rtl .dof-qty-btn.dof-qty-plus {
    border-radius: var(--dof-field-radius) 0 0 var(--dof-field-radius);
    border-right: none;
    border-left: 1.5px solid var(--dof-field-border);
}
.dof-qty-wrapper input[type="number"] {
    width: 50px;
    text-align: center;
    border-radius: 0;
    padding: 8px 4px;
    -moz-appearance: textfield;
    border: 1.5px solid var(--dof-field-border);
}
.dof-qty-wrapper input[type="number"]::-webkit-inner-spin-button,
.dof-qty-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Submit Button */
.dof-submit-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--dof-btn-radius);
    font-size: var(--dof-btn-font-size);
    font-weight: 700;
    cursor: pointer;
    background: var(--dof-btn-bg);
    color: var(--dof-btn-color);
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
}
.dof-submit-btn:hover {
    background: var(--dof-btn-hover-bg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.dof-submit-btn:active {
    transform: scale(0.98);
}
.dof-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.dof-submit-btn .dof-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dof-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes dof-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.dof-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    display: none;
}
.dof-message.dof-msg-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.dof-message.dof-msg-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Floating CTA */
#dof-floating-cta {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    padding: 16px 20px;
    background: var(--dof-float-bg);
    color: var(--dof-float-color);
    text-align: center;
    border-radius: var(--dof-float-radius);
    font-size: 16px;
    font-weight: 700;
    z-index: 999999;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    display: none;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease;
    border: none;
    -webkit-tap-highlight-color: transparent;
}
#dof-floating-cta:active {
    transform: translateX(-50%) scale(0.96);
}
#dof-floating-cta.dof-float-hidden {
    opacity: 0;
    pointer-events: none;
}
@media (min-width: 769px) {
    #dof-floating-cta {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dof-order-section {
        padding: 5px 0;
    }
    .dof-badge {
        font-size: 14px;
        padding: 11px 13px;
    }
    .dof-submit-btn {
        font-size: 16px;
        padding: 14px 16px;
    }
    .dof-form-wrapper {
        padding: 14px;
    }
    .dof-offer-label {
        font-size: 18px;
    }
    .dof-price {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .dof-badge {
        font-size: 13px;
        padding: 10px 12px;
    }
    .dof-field input,
    .dof-field textarea,
    .dof-field select {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}
