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

.cod-wrapper {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    max-width: 520px;
    margin: 30px auto;
    padding: 0 16px;
}

.cod-form-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.cod-form-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 32px 28px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cod-form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(229,57,53,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cod-header-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.cod-form-title {
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.5px;
}

.cod-form {
    padding: 28px;
}

.cod-field-group {
    margin-bottom: 20px;
}

.cod-field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.cod-label-icon {
    font-size: 18px;
}

.cod-required {
    color: #e53935;
    font-size: 18px;
}

.cod-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    color: #1a1a2e;
    background: #f8f9ff;
    transition: all 0.25s ease;
    box-sizing: border-box;
    direction: rtl;
    outline: none;
}

.cod-input:focus {
    border-color: #0f3460;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15,52,96,0.08);
}

.cod-input.cod-invalid {
    border-color: #e53935;
    background: #fff5f5;
    box-shadow: 0 0 0 4px rgba(229,57,53,0.08);
}

.cod-input.cod-valid {
    border-color: #43a047;
    background: #f8fff8;
}

.cod-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a1a2e' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 40px;
}

.cod-error {
    display: block;
    color: #e53935;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
    padding-right: 4px;
    min-height: 18px;
}

.cod-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 8px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.cod-submit-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.cod-submit-btn:hover::before {
    left: 100%;
}

.cod-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229,57,53,0.4);
}

.cod-submit-btn:active {
    transform: translateY(0);
}

.cod-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.cod-success-msg {
    margin: 0 28px 0;
    padding: 18px 20px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 2px solid #43a047;
    border-radius: 12px;
    color: #1b5e20;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    line-height: 1.6;
}

.cod-success-msg .cod-order-id {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #43a047;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.cod-secure-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 12px 28px 20px;
    margin: 0;
    font-weight: 600;
}

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

.cod-form-card {
    animation: slideIn 0.4s ease;
}

/* Responsive */
@media (max-width: 480px) {
    .cod-form-title { font-size: 22px; }
    .cod-form { padding: 20px; }
    .cod-submit-btn { font-size: 16px; padding: 14px; }
}
