/* WooCommerce COD Quick Order Form Styles */

.cod-form-container {
    width: 100%;
    clear: both;
    margin: 20px 0;
}

/* ===== CLASSIC STYLE ===== */
.cod-quick-order-form.cod-style-classic {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 0;
    max-width: 600px;
    width: 100%;
}

/* ===== MODERN STYLE ===== */
.cod-quick-order-form.cod-style-modern {
    background: #fff;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin: 0;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.cod-modern-summary {
    background: #1a1a1a;
    color: #fff;
    padding: 25px;
}

.cod-modern-product {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cod-modern-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.cod-modern-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.cod-modern-price {
    font-size: 20px;
    font-weight: bold;
    color: #f59e0b;
}

.cod-modern-totals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cod-modern-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.cod-modern-row.cod-modern-total {
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 18px;
    font-weight: bold;
    color: #f59e0b;
}

.cod-modern-form {
    padding: 25px;
    background: #fff;
}

.cod-modern-form .cod-form-group {
    margin-bottom: 15px;
}

.cod-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cod-input-icon {
    position: absolute;
    left: 15px;
    font-size: 18px;
    z-index: 1;
    background: #f59e0b;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.cod-input-wrapper input,
.cod-input-wrapper textarea {
    width: 100%;
    padding: 12px 15px 12px 65px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 14px;
    background: #f9fafb;
}

.cod-input-wrapper textarea {
    resize: vertical;
    font-family: inherit;
}

.cod-modern-btn {
    background: #1a1a1a !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.cod-modern-btn:hover {
    background: #000 !important;
}

/* Classic Style Specific */
.cod-style-classic .cod-order-form-fields {
    width: 100%;
}

.cod-form-group input,
.cod-form-group textarea,
.cod-form-group select {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===== PROPLUS STYLE ===== */
.cod-quick-order-form.cod-style-proplus {
    background: #fff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    margin: 0;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.proplus-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.proplus-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    text-align: center;
}

.proplus-options {
    padding: 0 20px 15px 20px;
}

.proplus-option {
    display: block;
    margin: 15px 0;
    cursor: pointer;
}

.proplus-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.proplus-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
    background: #fff;
}

.proplus-option input:checked + .proplus-option-content {
    border-color: #22c55e;
    background: #f0fdf4;
}

.proplus-option-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.proplus-option-left img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.proplus-option-left strong {
    display: block;
    font-size: 14px;
    color: #111;
    margin-bottom: 4px;
}

.proplus-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.proplus-badge-green {
    background: #22c55e;
    color: #fff;
}

.proplus-option-price {
    font-size: 16px;
    font-weight: bold;
    color: #111;
    text-align: right;
}

.proplus-original {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: normal;
}

.proplus-form {
    padding: 20px;
    background: #f9fafb;
}

.proplus-form-group {
    position: relative;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.proplus-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin-top: 0;
}

.proplus-form-group input,
.proplus-form-group select {
    width: 100%;
    padding: 14px 15px 14px 50px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    min-height: 48px;
}

.proplus-form-group input:focus,
.proplus-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.proplus-form-group input::placeholder {
    color: #9ca3af;
    line-height: 1.5;
}

.proplus-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
    margin-top: 8px;
}

.proplus-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 65, 108, 0.4);
}

.proplus-btn-icon {
    font-size: 20px;
}

.proplus-total-amount {
    font-weight: 700;
}

.cod-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.cod-form-group {
    margin-bottom: 20px;
}

.cod-form-group.full-width {
    grid-column: 1 / -1;
}

.cod-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cod-form-group .required {
    color: #e74c3c;
}

.cod-form-group input[type="text"],
.cod-form-group input[type="tel"],
.cod-form-group input[type="number"],
.cod-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.cod-form-group input:focus,
.cod-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

.cod-form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.quantity-product-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #0073aa;
    white-space: nowrap;
    text-align: right;
}

.product-price .cod-unit-price {
    font-size: 13px !important;
    font-weight: normal !important;
    color: #666 !important;
    display: block;
    margin-bottom: 5px;
    line-height: 1.2;
}

.product-price .cod-total-price {
    font-size: 22px;
    font-weight: bold;
    color: #0073aa;
    display: block;
    line-height: 1.2;
}

.product-price .woocommerce-Price-amount {
    font-size: 20px;
    font-weight: bold;
}

.cod-form-messages {
    margin: 15px 0;
    padding: 12px;
    border-radius: 4px;
    display: none;
}

.cod-form-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.cod-form-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.cod-submit-btn {
    width: 100%;
    padding: 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.cod-submit-btn:hover {
    background: #005a87;
}

.cod-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cod-btn-loading {
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cod-quick-order-form {
        padding: 20px;
        margin: 10px 0;
    }
    
    .cod-style-classic {
        padding: 20px !important;
    }
    
    .cod-modern-summary {
        padding: 20px;
    }
    
    .cod-modern-form {
        padding: 20px;
    }
    
    .cod-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .quantity-product-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-info {
        order: -1;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 4px;
        border-left: 3px solid #0073aa;
    }

    .product-price {
        font-size: 18px;
        text-align: left;
    }

    .product-price .cod-total-price {
        font-size: 20px;
    }

    .product-price .cod-unit-price {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .cod-quick-order-form {
        padding: 15px;
    }
    
    .cod-style-classic {
        padding: 15px !important;
    }
    
    .cod-modern-summary {
        padding: 15px;
    }
    
    .cod-modern-form {
        padding: 15px;
    }

    .cod-form-group label {
        font-size: 13px;
    }

    .cod-form-group input,
    .cod-form-group textarea {
        padding: 10px;
        font-size: 13px;
    }

    .cod-submit-btn {
        padding: 12px;
        font-size: 15px;
    }
    
    .cod-modern-product {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cod-input-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .cod-input-wrapper input,
    .cod-input-wrapper textarea {
        padding-left: 55px !important;
    }
    
    /* ProPlus responsive */
    .cod-style-proplus {
        max-width: 100%;
    }
    
    .proplus-header {
        padding: 15px;
    }
    
    .proplus-header h3 {
        font-size: 16px;
    }
    
    .proplus-options {
        padding: 0 15px 10px 15px;
    }
    
    .proplus-option-left img {
        width: 40px;
        height: 40px;
    }
    
    .proplus-option-left strong {
        font-size: 13px;
    }
    
    .proplus-form {
        padding: 15px;
    }
    
    .proplus-form-group input,
    .proplus-form-group select {
        padding: 12px 15px 12px 45px;
        font-size: 13px;
    }
}