/* ================================
   RTL RULES (Arabic)
================================ */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .form-control {
    text-align: right;
}

html[dir="rtl"] .control-label {
    text-align: right !important;
}

html[dir="rtl"] .radio-inline {
    flex-direction: row-reverse !important;
    margin: 0 0 10px 12px !important;
}
/* FINAL English (LTR) radio alignment fix */
html[dir="ltr"] .radio-inline input[type="radio"] {
    position: relative !important;
    top: -2px !important;     /* ⭐ PERFECT alignment for English text */
}


html[dir="rtl"] .star-rating {
    flex-direction: row-reverse;  /* RTL stars */
}

html[dir="rtl"] .footer-bottom {
    direction: rtl;
}


/* ================================
   LTR RULES (English)
================================ */
html[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

html[dir="ltr"] .form-control {
    text-align: left;
}

html[dir="ltr"] .control-label {
    text-align: left !important;
}

html[dir="ltr"] .radio-inline {
    flex-direction: row !important;
    margin: 0 12px 10px 0 !important;
}

html[dir="ltr"] .star-rating {
    flex-direction: row;  /* LTR stars */
}

html[dir="ltr"] .footer-bottom {
    direction: ltr;
}


/* ================================
   GLOBAL STYLES (Common for both)
================================ */
body {
    font-family: 'Tajawal', sans-serif;
    background: #f7f7f7;
}

.container-box {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.form-control {
    border-radius: 8px;
    font-size: 16px;
}

.required:after {
    content: " *";
    color: red;
    font-weight: bold;
}


/* ================================
   RADIO FIX — FINAL PERFECT ALIGNMENT
================================ */
.radio-inline {
    display: inline-flex !important;
    align-items: center !important;   /* PERFECT vertical alignment */
    gap: 6px;                         /* space between radio + text */
    white-space: nowrap;
    padding: 0 !important;
    margin: 0 12px 10px 0 !important;
}

/* Remove old broken positioning */
.radio-inline input[type="radio"] {
    position: relative !important;
    margin: 0 !important;
    top: 0 !important;
}


/*** STAR RATING ***/
.star-wrapper {
    display: inline-flex;
    align-items: center;
}

.star-rating {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.star-rating span {
    font-size: 38px;
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
}

.star-rating .selected {
    color: #FFD700 !important;
}


/*** SUCCESS MODAL ***/
.modal-backdrop.in {
    opacity: 0.4 !important;
}

.modal-content {
    border-radius: 10px;
    text-align: center;
}

.modal-header.bg-success {
    background: #4CAF50 !important;
    color: white !important;
}

.modal-sm {
    margin-top: 120px;
}

label.error {
    color: #ff6b6b !important;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}


/*** FOOTER ***/
.footer-bottom {
    background: #f7f7f7;
    border-top: 4px solid #f7f7f7;
    color: #000;
    padding: 15px 0;
    font-family: 'Tajawal', sans-serif;
}

.footer-bottom .copyright {
    font-size: 15px;
    font-weight: 400;
    padding-top: 10px;
}

.footer-bottom .design a img {
    width: 28px;
    height: 28px;
    margin: 0 6px;
    transition: 0.25s ease;
}

.footer-bottom .design a img:hover {
    transform: scale(1.18);
    opacity: 0.85;
}


/*** BUTTON LOADING ***/
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    border: 3px solid #fff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    animation: spin 0.6s linear infinite;
}

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