/* WebinWP COD - Frontend Order Form Styles */
*, *::before, *::after { box-sizing: border-box; }

.wcod-form-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 520px;
    margin: 0 auto;
    color: #111827;
}

/* Product image */
.wcod-product-image {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}
.wcod-product-image img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Gallery thumbnails */
.wcod-gallery {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.wcod-gallery-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.wcod-gallery-thumb:hover,
.wcod-gallery-thumb.active {
    border-color: #6366f1;
}

/* Product info */
.wcod-product-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.3;
}

.wcod-product-price {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 20px;
}
.wcod-product-price .wcod-regular-price {
    font-size: 16px;
    font-weight: 500;
    text-decoration: line-through;
    color: #9ca3af;
    margin-left: 8px;
}

/* Form fields */
.wcod-field {
    margin-bottom: 16px;
}
.wcod-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}
.wcod-field input[type="text"],
.wcod-field input[type="tel"],
.wcod-field input[type="email"],
.wcod-field input[type="number"],
.wcod-field input[type="url"],
.wcod-field textarea,
.wcod-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wcod-field input:focus,
.wcod-field textarea:focus,
.wcod-field select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.wcod-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Quantity selector */
.wcod-qty-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wcod-qty-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}
.wcod-qty-btn:hover {
    background: #ede9fe;
    border-color: #6366f1;
    color: #6366f1;
}
.wcod-qty-input {
    width: 64px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 4px;
    border: 1.5px solid #d1d5db;
}

/* Coupon row */
.wcod-coupon-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.wcod-coupon-row input {
    flex: 1;
}
.wcod-coupon-row .wcod-apply-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s;
}
.wcod-coupon-row .wcod-apply-btn:hover { opacity: 0.88; }

/* Order summary */
.wcod-summary {
    background: #f9fafb;
    padding: 16px;
    margin-bottom: 20px;
}
.wcod-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #6b7280;
}
.wcod-summary-row.wcod-total {
    font-size: 17px;
    font-weight: 800;
    color: #111;
    border-top: 1.5px solid #e5e7eb;
    margin-top: 6px;
    padding-top: 12px;
}
.wcod-discount-row { color: #10b981; }

/* Trust badges */
.wcod-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
    margin-bottom: 12px;
}
.wcod-badge-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}
.wcod-badge-icon {
    font-size: 16px;
}

/* Buttons */
.wcod-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.1s;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wcod-submit-btn:hover { opacity: 0.9; }
.wcod-submit-btn:active { transform: scale(0.99); }
.wcod-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.wcod-whatsapp-btn {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    background: #25D366;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}
.wcod-whatsapp-btn:hover { opacity: 0.9; }

/* Form messages */
.wcod-form-message {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    display: none;
}
.wcod-form-message.success {
    background: #d1fae5;
    color: #065f46;
    display: block;
}
.wcod-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Field error messages */
.wcod-field-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: block;
}

/* Sticky bar */
.wcod-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #6366f1;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.wcod-sticky-bar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: auto;
}

/* Loading spinner */
.wcod-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcod-spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes wcod-spin {
    to { transform: rotate(360deg); }
}

/* Success overlay */
.wcod-success-overlay {
    text-align: center;
    padding: 40px 20px;
}
.wcod-success-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.wcod-success-title {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin: 0 0 10px;
}
.wcod-success-msg {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* No product notice */
.wcod-no-product {
    padding: 20px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
    font-family: 'Inter', sans-serif;
}

/* Animations */
@keyframes wcod-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wcod-form-wrapper {
    animation: wcod-fadeIn 0.4s ease-out;
}

/* Packages */
.wcod-packages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wcod-package-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.wcod-package-option:hover {
    border-color: #6366f1;
    background: #fafafe;
}
.wcod-package-option.selected {
    border-color: #6366f1;
    background: #ede9fe;
}
.wcod-package-radio {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    flex-shrink: 0;
}
.wcod-package-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #111;
}
.wcod-package-price {
    font-size: 15px;
    font-weight: 800;
    color: #6366f1;
}

/* RTL support */
[dir="rtl"] .wcod-form-wrapper {
    direction: rtl;
}
[dir="rtl"] .wcod-coupon-row {
    flex-direction: row-reverse;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wcod-form-wrapper {
        padding: 20px !important;
    }
    .wcod-product-title { font-size: 18px; }
    .wcod-product-price { font-size: 20px; }
    .wcod-submit-btn    { font-size: 15px; padding: 13px; }
    .wcod-badges        { gap: 8px; }
    .wcod-badge-item    { font-size: 11px; }
}
