/**
 * Starter COD - Frontend Form Styles
 */

/* Container */
.starter-cod-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.starter-cod-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Product info */
.starter-cod-product-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.starter-cod-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.starter-cod-product-details {
    flex: 1;
}

.starter-cod-product-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0 0 5px 0;
}

.starter-cod-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

.starter-cod-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 14px;
    margin-right: 5px;
}

/* Form fields */
.starter-cod-field {
    margin-bottom: 15px;
    position: relative;
}

.starter-cod-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.starter-cod-field label .required {
    color: #d63638;
}

.starter-cod-field input,
.starter-cod-field select,
.starter-cod-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    box-sizing: border-box;
    background: #fff;
}

.starter-cod-field input:focus,
.starter-cod-field select:focus,
.starter-cod-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

/* Validation states */
.starter-cod-field.has-error input,
.starter-cod-field.has-error select,
.starter-cod-field.has-error textarea {
    border-color: #d63638;
    background-color: #fff5f5;
}

.starter-cod-field.has-error input:focus,
.starter-cod-field.has-error select:focus,
.starter-cod-field.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1);
}

.starter-cod-field.is-valid input,
.starter-cod-field.is-valid select,
.starter-cod-field.is-valid textarea {
    border-color: #00a32a;
    background-color: #f0fff4;
}

.starter-cod-field .error-message {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    min-height: 18px;
}

.starter-cod-field:not(.has-error) .error-message {
    visibility: hidden;
}

/* Global error message */
.starter-cod-global-error {
    display: none;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #f87171;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: shakeError 0.5s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Offer error styles */
.offer-piece.has-error,
.offer-variation-field.has-error {
    border-color: #f87171 !important;
    background: #fef2f2 !important;
}

.offer-error-message {
    color: #dc2626;
    font-size: 12px;
    margin-top: 8px;
    padding: 6px 10px;
    background: #fee2e2;
    border-radius: 4px;
    display: none;
}

.has-error .offer-error-message {
    display: block;
}

/* Variation option error state */
.variation-options.has-error {
    border: 2px solid #f87171;
    border-radius: 8px;
    padding: 8px;
    background: #fef2f2;
}

/* Quantity */
.starter-cod-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.starter-cod-quantity button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.2s;
}

.starter-cod-quantity button:hover {
    background: #eee;
}

.starter-cod-quantity input {
    width: 60px;
    text-align: center;
    -moz-appearance: textfield;
}

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

/* Variations */
.starter-cod-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.starter-cod-variation-option {
    padding: 8px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.starter-cod-variation-option:hover {
    border-color: #999;
}

.starter-cod-variation-option.selected {
    border-color: #2271b1;
    background: rgba(34, 113, 177, 0.05);
}

.starter-cod-variation-option input {
    display: none;
}

/* Upsell / Order bump */
.starter-cod-upsell {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px dashed #f59e0b;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.starter-cod-upsell::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.starter-cod-upsell-header {
    margin-bottom: 12px;
}

.starter-cod-upsell-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.starter-cod-upsell-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.starter-cod-upsell-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #f59e0b;
    flex-shrink: 0;
}

.starter-cod-upsell-content {
    flex: 1;
}

.starter-cod-upsell-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.starter-cod-upsell-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.starter-cod-upsell-details {
    flex: 1;
}

.starter-cod-upsell-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #1f2937;
}

.starter-cod-upsell-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.4;
}

.starter-cod-upsell-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.starter-cod-upsell-price del {
    color: #9ca3af;
    font-size: 13px;
}

.starter-cod-upsell-price strong {
    color: #059669;
    font-size: 16px;
}

.starter-cod-upsell-savings {
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Upsell checked state */
.starter-cod-upsell:has(input:checked) {
    border-color: #059669;
    border-style: solid;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.starter-cod-upsell:has(input:checked) .starter-cod-upsell-badge {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Summary */
.starter-cod-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.starter-cod-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.starter-cod-summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    padding-top: 12px;
    color: #1f2937;
}

.starter-cod-summary-row.upsell-row {
    color: #059669;
    font-size: 14px;
}

/* Value change animation */
.value-changing {
    animation: valueChange 0.3s ease;
}

@keyframes valueChange {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* OTP Modal */
.starter-cod-otp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

/* =================================
   QUANTITY OFFERS - EXPANDABLE CARDS
================================= */
.qty-offers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qty-offer-card {
    position: relative;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qty-offer-card:hover {
    border-color: #667eea;
}

.qty-offer-card.selected {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.qty-offer-card.expanded {
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
}

/* Header */
.qty-offer-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 15px;
}

.qty-offer-header input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
}

.qty-offer-badge {
    position: absolute;
    top: -1px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 0 0 8px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== BADGE STYLES ===== */

/* Style 1 - Ruban (default) */
.qty-offer-badge.badge-style1 {
    position: absolute;
    top: -1px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #fff;
    padding: 4px 12px;
    border-radius: 0 0 8px 8px;
    font-size: 11px;
    font-weight: 600;
}

/* Style 2 - Pill */
.qty-offer-badge.badge-style2 {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
}

/* Style 3 - Coin incliné */
.qty-offer-badge.badge-style3 {
    position: absolute;
    top: 8px;
    right: -25px;
    background: #ff9800;
    color: #fff;
    padding: 3px 35px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    border-radius: 0;
}

/* Style 4 - Étoile */
.qty-offer-badge.badge-style4 {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffd700, #ffb300);
    color: #333;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
}

.qty-offer-badge.badge-style4::before {
    content: '⭐ ';
}

.qty-offer-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.qty-offer-label {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
}

.qty-offer-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-offer-price .price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 14px;
}

.qty-offer-price .price-final {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.qty-offer-savings,
.qty-offer-discount {
    background: #10b981;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ===== DISCOUNT STYLES ===== */

/* Style 1 - Simple text */
.qty-offer-discount.discount-style1 {
    color: #10b981;
    font-weight: 700;
    font-size: 14px;
    background: none;
    padding: 0;
}

/* Style 2 - Cercle */
.qty-offer-discount.discount-style2 {
    background: #10b981;
    color: #fff;
    min-width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    padding: 0;
}

/* Style 3 - Tag */
.qty-offer-discount.discount-style3 {
    background: #ef4444;
    color: #fff;
    padding: 5px 12px 5px 18px;
    font-size: 11px;
    font-weight: 700;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 15% 100%, 0% 50%);
    border-radius: 0;
}

/* Style 4 - Fire */
.qty-offer-discount.discount-style4 {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.qty-offer-discount.discount-style4::before {
    content: '🔥 ';
}

.qty-offer-chevron {
    color: #9ca3af;
    transition: transform 0.3s ease;
    display: flex;
}

.qty-offer-card.expanded .qty-offer-chevron {
    transform: rotate(180deg);
    color: #667eea;
}

/* Body - Variations */
.qty-offer-body {
    padding: 0 20px 20px;
    border-top: 1px solid #e5e7eb;
    margin-top: 0;
    padding-top: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single variation (no pieces) */
.offer-variations-single {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.offer-variation-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.offer-variation-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.offer-variation-label .selected-value {
    color: #667eea;
    font-weight: 400;
}

.offer-variation-label .selected-value::before {
    content: ': ';
}

/* Pieces inside offer */
.offer-piece {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.offer-piece:last-child {
    margin-bottom: 0;
}

.offer-piece-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e5e7eb;
}

.offer-piece-number {
    font-weight: 600;
    font-size: 14px;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 6px;
}

.offer-piece-number::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.offer-piece[data-piece="1"] .offer-piece-number::before { content: '1'; }
.offer-piece[data-piece="2"] .offer-piece-number::before { content: '2'; }
.offer-piece[data-piece="3"] .offer-piece-number::before { content: '3'; }
.offer-piece[data-piece="4"] .offer-piece-number::before { content: '4'; }
.offer-piece[data-piece="5"] .offer-piece-number::before { content: '5'; }

.offer-piece-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offer-piece .offer-variation-field {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.offer-piece .offer-variation-label {
    min-width: 70px;
    margin-bottom: 0;
}

.offer-piece .variation-options {
    flex: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .qty-offer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .qty-offer-price {
        flex-wrap: wrap;
    }
    
    .offer-piece .offer-variation-field {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .offer-piece .offer-variation-label {
        min-width: auto;
    }
}

/* =================================
   VARIATION STYLES
================================= */
.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.variation-dropdown select {
    width: 100%;
}

/* Buttons variation */
.variation-btn {
    position: relative;
    cursor: pointer;
}

.variation-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.variation-btn span {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #fff;
}

.variation-btn:hover span {
    border-color: #667eea;
}

.variation-btn.selected span,
.variation-btn input:checked + span {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

/* Outline style */
.variation-btn--outline.selected span {
    background: transparent;
    color: #667eea;
}

/* Filled style */
.variation-btn--filled span {
    background: #f3f4f6;
    border-color: #f3f4f6;
}

.variation-btn--filled.selected span {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* Minimal style */
.variation-btn--minimal span {
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
}

.variation-btn--minimal.selected span {
    background: #667eea;
    color: #fff;
}

/* Color swatches */
.variation-color {
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    overflow: hidden;
}

.variation-color input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.variation-color .color-swatch {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.variation-color .color-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 700;
    color: #333;
    text-shadow: 0 0 2px #fff;
}

.variation-color:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.variation-color.selected,
.variation-color:has(input:checked) {
    border-color: #667eea;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #667eea;
}

/* Image swatches */
.variation-image {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    border: 3px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s ease;
}

.variation-image input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.variation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variation-image .image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.variation-image:hover {
    border-color: #667eea;
}

.variation-image.selected,
.variation-image:has(input:checked) {
    border-color: #667eea;
    box-shadow: 0 0 0 2px #667eea;
}

/* Selected value display */
.starter-cod-field label .selected-value {
    font-weight: 400;
    color: #667eea;
    margin-left: 5px;
}

.starter-cod-field label .selected-value::before {
    content: ': ';
}

/* =================================
   WHATSAPP BUTTON
================================= */
.starter-cod-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.starter-cod-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.starter-cod-whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.starter-cod-whatsapp-btn svg {
    flex-shrink: 0;
}

/* Product image sync animation */
.starter-cod-product-image,
.woocommerce-product-gallery__image img,
.product-image img,
.elementor-widget-image img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.starter-cod-product-image.changing,
.woocommerce-product-gallery__image img.changing,
.product-image img.changing,
.elementor-widget-image img.changing,
img.changing {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 480px) {
    .qty-offers--buttons {
        flex-direction: column;
    }
    
    .qty-offer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .qty-offer-price {
        text-align: left;
    }
    
    .variation-options {
        gap: 6px;
    }
}

.starter-cod-otp-modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: otpModalIn 0.3s ease;
}

@keyframes otpModalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.starter-cod-otp-modal .otp-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 5px;
}

.starter-cod-otp-modal .otp-close:hover {
    color: #333;
}

.starter-cod-otp-modal h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    color: #1f2937;
}

.starter-cod-otp-modal .otp-phone {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 20px;
    color: #374151;
}

.starter-cod-otp-modal .otp-step p {
    color: #6b7280;
    margin-bottom: 15px;
}

.starter-cod-otp-modal .otp-input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 15px;
    font-family: monospace;
}

.starter-cod-otp-modal .otp-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.starter-cod-otp-modal .button {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
}

.starter-cod-otp-modal .otp-timer {
    color: #6b7280;
    font-size: 14px;
    margin-top: 15px;
}

.starter-cod-otp-modal .otp-resend {
    margin-top: 10px;
}

.starter-cod-otp-modal .otp-resend a {
    color: #667eea;
    text-decoration: none;
}

.starter-cod-otp-modal .otp-resend a:hover {
    text-decoration: underline;
}

.starter-cod-otp-modal .otp-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

/* Submit button */
.starter-cod-submit {
    width: 100%;
    padding: 15px 25px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.starter-cod-submit:hover {
    background: #135e96;
}

.starter-cod-submit:active {
    transform: scale(0.98);
}

.starter-cod-submit:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.starter-cod-submit .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* COD badge */
.starter-cod-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}

.starter-cod-badge svg {
    width: 20px;
    height: 20px;
}

/* Success message */
.starter-cod-success {
    text-align: center;
    padding: 30px 20px;
}

.starter-cod-success-icon {
    width: 60px;
    height: 60px;
    background: #00a32a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.starter-cod-success-icon svg {
    width: 30px;
    height: 30px;
    color: #fff;
}

.starter-cod-success h3 {
    color: #00a32a;
    margin: 0 0 10px 0;
}

.starter-cod-success p {
    color: #666;
    margin: 0;
}

/* Error message */
.starter-cod-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #f5c6cb;
    border-left: 4px solid #d63638;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 0 6px 6px 0;
    color: #721c24;
    animation: slideIn 0.3s ease;
}

.starter-cod-error .error-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.starter-cod-error .error-text {
    flex: 1;
    font-size: 14px;
}

.starter-cod-error .error-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #721c24;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.starter-cod-error .error-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.starter-cod-form.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.starter-cod-form.loading-variation .starter-cod-product-info {
    opacity: 0.6;
    transition: opacity 0.2s;
}

/* Availability */
.starter-cod-availability {
    font-size: 13px;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.starter-cod-availability.low-stock {
    background: #fff3cd;
    color: #856404;
}

.starter-cod-availability.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.starter-cod-availability.hidden {
    display: none;
}

/* Honeypot (hidden) */
.starter-cod-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .starter-cod-form {
        padding: 20px 15px;
    }
    
    .starter-cod-product-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .starter-cod-product-image {
        width: 120px;
        height: 120px;
    }
}

/* Editor notice */
.starter-cod-editor-notice {
    background: #f0f6fc;
    border: 1px dashed #2271b1;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #2271b1;
}

.starter-cod-editor-notice p {
    margin: 0;
}

/* Variations field */
.starter-cod-variations-field {
    margin-bottom: 15px;
}

.starter-cod-variations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.starter-cod-variation-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    min-width: 60px;
    text-align: center;
}

.starter-cod-variation-option:hover {
    border-color: #999;
    background: #f9f9f9;
}

.starter-cod-variation-option.selected,
.starter-cod-variation-option:has(input:checked) {
    border-color: #2271b1;
    background: rgba(34, 113, 177, 0.05);
    color: #2271b1;
}

.starter-cod-variation-option input {
    display: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .starter-cod-form {
        background: #1d2327;
        color: #f0f0f1;
    }
    
    .starter-cod-field input,
    .starter-cod-field select,
    .starter-cod-field textarea {
        background: #2c3338;
        border-color: #3c434a;
        color: #f0f0f1;
    }
    
    .starter-cod-summary {
        background: #2c3338;
    }
    
    .starter-cod-summary-row {
        border-color: #3c434a;
    }
}
