/* COD DZ Checkout Style */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

.cod-dz-checkout-container {
    direction: rtl;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--cod-dz-bg);
    border: 1px solid #eef2f5;
    border-radius: 16px;
    padding: 30px;
    max-width: 580px;
    margin: 25px auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.cod-dz-checkout-container * {
    box-sizing: border-box;
}

.cod-dz-checkout-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--cod-dz-text);
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--cod-dz-primary);
    padding-bottom: 12px;
    display: inline-block;
    width: 100%;
}

.cod-dz-form-group {
    margin-bottom: 18px;
    position: relative;
}

.cod-dz-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 6px;
}

.cod-dz-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #cbd5e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    color: var(--cod-dz-text);
    background-color: #f7fafc;
    transition: all 0.3s ease;
    outline: none;
}

.cod-dz-input:focus {
    border-color: var(--cod-dz-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--cod-dz-primary-rgb), 0.15);
}

.cod-dz-row {
    display: flex;
    gap: 15px;
}

.cod-dz-row .cod-dz-form-group {
    flex: 1;
}

/* Delivery Type Selector Cards */
.cod-dz-delivery-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cod-dz-delivery-card {
    flex: 1;
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.cod-dz-delivery-card input[type="radio"] {
    display: none;
}

.cod-dz-delivery-card:hover {
    border-color: #4fd1c5;
    background: #f0fff4;
}

.cod-dz-delivery-card.active {
    border-color: var(--cod-dz-primary);
    background: rgba(var(--cod-dz-primary-rgb), 0.05);
    box-shadow: 0 4px 12px rgba(var(--cod-dz-primary-rgb), 0.1);
}

.cod-dz-delivery-card .icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.cod-dz-delivery-card .title {
    font-weight: 700;
    font-size: 14px;
    color: #2d3748;
    display: block;
}

.cod-dz-delivery-card .desc {
    font-size: 11px;
    color: #718096;
    display: block;
    margin-top: 2px;
}

/* Summary Box */
.cod-dz-summary-box {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.cod-dz-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
}

.cod-dz-summary-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 16px;
    color: #2d3748;
}

/* Submit Button & Add to Cart Option */
.cod-dz-submit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.cod-dz-submit-btn {
    width: 100%;
    background: var(--cod-dz-primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(var(--cod-dz-primary-rgb), 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    outline: none;
}

.cod-dz-submit-btn:hover {
    background: var(--cod-dz-hover);
    box-shadow: 0 6px 20px rgba(var(--cod-dz-primary-rgb), 0.5);
    transform: translateY(-1px);
}

.cod-dz-submit-btn:active {
    transform: translateY(1px);
}

/* Pulse animation for CTA */
@keyframes codDzPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--cod-dz-primary-rgb), 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--cod-dz-primary-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--cod-dz-primary-rgb), 0);
    }
}

.cod-dz-submit-btn {
    animation: codDzPulse 2s infinite;
}

/* Cart Button */
.cod-dz-cart-btn {
    background: none;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.cod-dz-cart-btn:hover {
    background: #edf2f7;
    color: #2d3748;
    border-color: #a0aec0;
}

/* Loader style */
.cod-dz-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 10;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
}

.cod-dz-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cod-dz-primary);
    border-radius: 50%;
    animation: codDzSpin 1s linear infinite;
}

@keyframes codDzSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Message styling */
.cod-dz-message {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    display: none;
    font-weight: 600;
}

.cod-dz-message.error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    display: block;
}

.cod-dz-message.success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #22543d;
    display: block;
}

/* Responsive adjustment */
@media(max-width: 480px) {
    .cod-dz-row {
        flex-direction: column;
        gap: 0;
    }
    .cod-dz-checkout-container {
        padding: 20px;
        margin: 15px auto;
        border-radius: 10px;
    }
}
