/* =============================================
   Smart Family Tree System - Global Styles (RTL)
   ============================================= */

/* Font */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f5f6fa;
    min-height: 100vh;
    margin-bottom: 60px;
}

/* Focus States */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Navbar */
.navbar-brand {
    font-size: 1.2rem;
}

.nav-link.active {
    font-weight: 600;
    border-bottom: 2px solid #fff;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
}

/* Table */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr {
    cursor: pointer;
}

/* Footer */
.footer {
    background-color: #fff;
}

/* Toast Styling */
.toast {
    border-radius: 0.5rem;
}

/* =============================================
   Autocomplete Styles
   ============================================= */
.autocomplete-input {
    padding-left: 2.5rem;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1050;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #e9ecef;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-no-results {
    padding: 0.5rem 0.75rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.clear-autocomplete {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #dc3545;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

/* =============================================
   Person Detail Modal
   ============================================= */
.detail-section {
    margin-bottom: 1rem;
}

.detail-section h6 {
    color: #0d6efd;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.relation-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.relation-badge:hover {
    opacity: 0.8;
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
    direction: ltr;
}

