/* Myecom Checkout Form Styles - Noto Sans Arabic / Premium Minimalist Design System */

.myecom-checkout-container {
    font-family: 'Noto Sans Arabic', sans-serif;
    color: #0f172a;
    background-color: transparent;
    max-width: 440px;
    margin: 0 auto;
    text-align: right;
    box-sizing: border-box;
}

.myecom-checkout-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Premium Card */
.checkout-card {
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 12px 10px;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.02), 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}

.checkout-card-header {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.secure-badge {
    align-self: flex-start;
    background-color: #f5f3ff; /* Violet-50 */
    color: #7c3aed; /* Violet-600 */
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #ddd6fe; /* Violet-200 */
}

.secure-badge svg {
    stroke: #7c3aed;
}

.checkout-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

/* Form Layout Groups */
.form-group {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #3f3f46; /* Zinc-700 */
    margin-bottom: 6px;
}

/* Large legible input structures */
.form-input, 
.form-select {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    border: 1.5px solid #e4e4e7;
    background-color: #fcfcfd;
    padding: 0 16px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: #a1a1aa;
    font-weight: 400;
    font-size: 0.85rem;
    text-align: right;
}

#c-phone::placeholder {
    text-align: right;
}

.form-input:focus, 
.form-select:focus {
    background-color: #ffffff;
    border-color: #7c3aed; /* Violet-600 */
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Select indicators */
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
}

[dir="rtl"] .form-select {
    background-position: left 12px center;
}

.error-msg {
    color: #ef4444;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.error-msg.show {
    display: block;
}

.input-error {
    border-color: #ef4444 !important;
    background-color: #fffefb !important;
}

/* Delivery options list layout */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 4px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: #4b5563;
    transition: color 0.25s ease;
    user-select: none;
    padding: 4px 0;
}

.radio-option.active {
    color: #7c3aed; /* Violet-600 */
}

.radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    position: relative;
}

.radio-option.active .radio-circle {
    border-color: #7c3aed;
    background: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
    animation: radioPulse 0.4s ease;
}

.radio-circle svg {
    width: 11px;
    height: 11px;
    color: #ffffff;
    opacity: 0;
    transform: scale(0);
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    stroke: currentColor;
    stroke-width: 3.5;
}

.radio-option.active .radio-circle svg {
    opacity: 1;
    transform: scale(1);
}

@keyframes radioPulse {
    0% { box-shadow: 0 0 0 0px rgba(124, 58, 237, 0.4); }
    60% { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0); }
    100% { box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
}

/* Quantity Upsell List */
.upsell-container {
    border: 1px solid #ddd6fe; /* Violet-200 */
    background-color: #f5f3ff; /* Violet-50 */
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.upsell-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6d28d9;
    margin-bottom: 8px;
}

.upsell-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.upsell-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
}

.upsell-row input {
    accent-color: #7c3aed;
}

/* Invoice breakdown details */
.invoice-box {
    background-color: #fafafa;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 6px;
}

.invoice-row:last-child {
    margin-bottom: 0;
}

.total-row {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    border-top: 1px dashed #e4e4e7;
    padding-top: 10px;
    margin-top: 10px;
}

/* Submit Action Button */
.submit-action-btn {
    width: 100%;
    height: 56px;
    background-color: #7c3aed; /* Violet-600 */
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.2), 0 4px 6px -4px rgba(124, 58, 237, 0.1);
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.submit-action-btn:hover {
    background-color: #6d28d9;
}

.submit-action-btn:active {
    transform: scale(0.98);
}

.submit-action-desc {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 1px;
}

.submit-action-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Trust Badges Grid */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    margin-top: 10px;
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    gap: 4px;
}

.trust-item svg {
    stroke: #7c3aed;
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-3px); }
}
