/* manage_zoho — the styles this app adds on top of Bootstrap.
 *
 * Lived inline in layouts/app.blade.php until 2026-10-18, which meant the
 * browser re-read it with every page instead of caching it once.
 *
 * Bootstrap itself is loaded from the CDN in that layout, in the LTR or the
 * RTL build depending on the locale. Nothing here should fight it: rules that
 * only exist to undo Bootstrap belong in Bootstrap's own direction-aware
 * build, not here.
 */

.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}
.sidebar .nav-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 0;
    padding: 12px 15px;
}
.sidebar .nav-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateX(5px);
}
.sidebar .nav-link.active {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}
.lang-switcher {
    position: fixed;
    top: 20px;
    z-index: 1000;
}
html:dir(rtl) .lang-switcher {
    left: 20px;
    right: auto;
}
html:dir(ltr) .lang-switcher {
    right: 20px;
    left: auto;
}

/* The pill itself, taken from the switch on myfatoorah.com: white, a hairline
 * border, and the brand navy on the text. No shadow — the border carries it.
 *
 * The flag stays in the label, in the messages.php of each language, rather
 * than becoming an icon — so this needs nothing from the icon font.
 */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border: 1.5px solid #e3e8f2;
    border-radius: 999px;
    background: #fff;
    color: #0e1a3d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lang-switch:hover,
.lang-switch:focus {
    background: #f6f8fd;
    border-color: #c9d4ea;
    color: #0e1a3d;
}

/* Keyboard focus has to stay visible once the hover colours are this quiet. */
.lang-switch:focus-visible {
    outline: 2px solid #002bff;
    outline-offset: 2px;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid #4a6572;
}
.logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.logo-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
}
.main-content {
    background-color: white;
    min-height: 100vh;
    margin-top: 4rem;
}

/* Chrome gives input[type=number], [type=email], [type=tel] and [type=url] a
 * direction of ltr in its own stylesheet, whatever the page direction is. On
 * an Arabic form that leaves those values sitting against the left edge while
 * every neighbouring field sits against the right, which reads as a mistake.
 *
 * Only the alignment is corrected here. The direction is deliberately left
 * alone: an email or an ID is Latin text and should stay laid out left to
 * right — it is where the box puts it that was wrong, not the text itself.
 *
 * This does not belong in Bootstrap's RTL build; the rule it works around
 * comes from the browser, not from Bootstrap.
 */
[dir="rtl"] input[type="number"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="url"] {
    text-align: right;
}

/* Hide the number stepper.
 *
 * The one number field in this app is an organization id — an identifier, not
 * a quantity. Nobody nudges it up by one, and Chrome draws the stepper on the
 * right whatever the page direction is, because number inputs keep an ltr
 * direction in its own stylesheet. Removing it settles both: the field then
 * matches the text fields beside it in either language.
 *
 * The keyboard's up and down arrows still work; only the drawn control goes.
 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ─── Login and register ────────────────────────────────────────────────────
 *
 * These lived inline in auth/login.blade.php and auth/register.blade.php,
 * which is what kept them off the rest of the app: they restyle .card, .btn
 * and a, and every admin screen uses all three. Moved here they need the
 * .auth-page wrapper to go on doing only what they did before.
 *
 * The two blocks were identical apart from a rule for a "remember me"
 * checkbox that is commented out in the markup. It is not carried over.
 */
.auth-page .card {
    border: none;
    border-radius: 15px;
}

.auth-page .card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

.auth-page .form-control {
    border-radius: 8px;
    padding: 12px 15px;
}

.auth-page .btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-page .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.auth-page a {
    color: #0d6efd;
    transition: color 0.3s ease;
}

.auth-page a:hover {
    color: #0b5ed7;
}

/* ─── Store settings ────────────────────────────────────────────────────────
 *
 * From store/edit.blade.php. Scoped to .store-form for the same reason:
 * .input-group .btn and .form-check-input are not this screen's alone.
 */
.store-form .input-group .btn {
    border: 1px solid #dee2e6;
}

.store-form #myfatoorah_webhookURL {
    cursor: pointer;
    font-family: monospace;
    font-size: 0.85em;
    padding: 0.25rem 0.5rem;
}

.store-form #myfatoorah_webhookURL:hover {
    background-color: #0dcaf0 !important;
    color: white !important;
}

.store-form .form-check-input {
    width: 3em;
    height: 1.5em;
}

/* ─── Images ────────────────────────────────────────────────────────────────
 *
 * These three were style="" attributes on the elements themselves until
 * 2026-10-18. The logo rules in particular were two different sizes under one
 * class name, logo-img, which had no rule of its own anywhere — the class was
 * only ever a hook for the inline style. They are separate names now.
 */
.brand-logo {
    width: 60px;
}

/* The guest logo is the horizontal wordmark, 815.7 x 141.4 in the source —
   about 5.8:1, where the sidebar icon is square. It needs its own width. */
.guest-logo {
    width: 220px;
}

.avatar-circle {
    width: 80px;
    height: 80px;
}

/* ─── Signed-out screens ────────────────────────────────────────────────────
 *
 * Login and register carry one small card each, which left against the top of
 * the window looked stranded. The shell fills the viewport and centres its
 * contents instead.
 *
 * min-height rather than height, and padding rather than nothing: on a short
 * window the card grows past the fold and has somewhere to go, instead of
 * being clipped by a container that refuses to grow.
 */
.guest-shell {
    min-height: 100vh;
    padding: 10vh 1rem 2rem;
}

/* Why a fixed 10vh rather than centring the shell:
 *
 * Centring puts the logo wherever the page's own height lands it, and register
 * carries one field more than login — 477px of card against 387px. Split by
 * the centring that moved the logo 45px between the two screens, so following
 * the link from one to the other made the page jump.
 *
 * 10vh pins it in the same place on both, with no reference to how tall the
 * form is, so adding a field later changes nothing. Measured at 1280x800:
 * the logo sits at 80px on both, which is where centring put register before.
 */
