/* ============================================
   SURA - Custom Application Styles
   ============================================ */

/* Alpine.js cloak directive */
[x-cloak] { display: none !important; }

/* ============================================
   Font Definitions
   ============================================ */
body { font-family: 'Inter', sans-serif; }
[dir="rtl"] body { font-family: 'IBM Plex Sans Arabic', 'Inter', sans-serif; }

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] {
    font-family: 'IBM Plex Sans Arabic', 'Figtree', sans-serif;
}

[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}

/* RTL sidebar transform overrides */
[dir="rtl"] aside {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

[dir="rtl"] aside.translate-x-0,
[dir="rtl"] aside[style*="translate-x-0"] {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    [dir="rtl"] aside {
        transform: translateX(0);
    }
}

/* ============================================
   Form Elements (Global Base Styles)
   :where() kullanılarak sıfır specificity —
   Tailwind utility sınıfları bu stilleri ezebilir.
   ============================================ */
:where(input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="file"],
textarea,
select) {
    border: 1px solid rgb(209 213 219);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    appearance: none;
    background-color: #fff;
    color: rgb(17 24 39);
    width: 100%;
}

:where(select) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

:where(.dark) :where(input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="file"],
textarea,
select) {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
    color: rgb(229 231 235);
}

:where(.dark) :where(select) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

:where(input:focus, textarea:focus, select:focus) {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
    border-color: rgb(99 102 241);
}

/* ============================================
   Auth Background (Guest Layout)
   ============================================ */
.auth-bg {
    background-color: #121121;
    background-image:
        radial-gradient(at 0% 0%, rgba(80, 72, 229, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(80, 72, 229, 0.3) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(124, 58, 237, 0.2) 0px, transparent 50%);
}

/* ============================================
   Print Styles (Shared Cart)
   ============================================ */
@media print {
    body { background: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    header, .no-print { display: none !important; }
    main { padding: 0 !important; max-width: 100% !important; }
    #printArea .bg-white { border: none !important; box-shadow: none !important; border-radius: 0 !important; }
    #printArea table { font-size: 11px; }
    #printArea table img { display: block !important; width: 40px !important; height: 40px !important; object-fit: contain; padding: 2px; }
    #printArea .bg-gray-50 { background-color: #f9fafb !important; }
}
