/* Custom styles for Secret Customer App */

/* ===== Toastr Fixed Position - Modal içinde formu kaydırmasın ===== */
#toast-container {
    position: fixed !important;
    z-index: 9999 !important;
    pointer-events: none;
}

#toast-container > div {
    pointer-events: auto;
}

#toast-container.toast-top-right {
    top: 12px !important;
    right: 12px !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

.btn {
    border-radius: 5px;
}

.nav-pills .nav-link {
    border-radius: 5px;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
}

/* Loading spinner centering */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Responsive layout adjustments */
@media (max-width: 991.98px) {
    .flex-grow-1.d-flex.flex-column {
        margin-left: 0 !important;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .nav-pills {
        flex-direction: column;
    }

    .nav-pills .nav-item {
        margin-bottom: 0.5rem;
    }
}

/* ===== Table Dropdown Fix - Card içinde kesilmemesi için ===== */
/* NOT: .table-responsive-scrollable class'ı olan elementler hariç tutulur (özet tabloları için) */
/* NOT: .card-body-scrollable class'ı olan elementler hariç tutulur (max-height + scroll olan paneller için) */
.card-body:not(.card-body-scrollable) {
    overflow: visible !important;
}

.card-body-scrollable {
    overflow-y: auto !important;
}

.table-responsive:not(.table-responsive-scrollable) {
    overflow: visible !important;
}

.table .dropdown-menu {
    position: absolute;
    z-index: 1050;
}

/* Son satırlardaki dropdown'ların yukarı açılması */
tbody tr:nth-last-child(-n+3) .dropdown-menu {
    top: auto !important;
    bottom: 100% !important;
    transform: none !important;
}

/* ===== Utility Classes ===== */
.spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.white-space-pre-wrap {
    white-space: pre-wrap;
}

.sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
}

.badge-sm {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
}

.table-success-light { background-color: rgba(25, 135, 84, 0.15) !important; }
.table-warning-light { background-color: rgba(255, 193, 7, 0.15) !important; }
.table-danger-light { background-color: rgba(220, 53, 69, 0.15) !important; }

/* ===== Print Styles ===== */
@media print {
    .card-header.bg-primary,
    .card-header.bg-dark,
    .card-header.bg-info,
    .card-header.bg-secondary,
    .card-header.bg-success,
    .card-header.bg-danger,
    .card-header.bg-warning,
    .card-header.bg-purple,
    .card-header.bg-gradient,
    .card-header.bg-white,
    .card-header.bg-light { background-color: #fba92d !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    thead.table-dark,
    thead.table-light,
    thead.table-dark th,
    thead.table-light th,
    .table > thead,
    .table > thead th { background-color: #fba92d !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-success { background-color: #198754 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-warning { background-color: #ffc107 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-danger { background-color: #dc3545 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .text-white { color: white !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .progress-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== Filter Dropdown - Global Styles ===== */
.filter-dropdown {
    min-width: 320px;
    z-index: 1030;
}

/* ===== Sortable Table Headers ===== */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s ease-in-out;
}

th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

th.sortable .sort-icon {
    margin-left: 5px;
    opacity: 0.3;
    font-size: 0.85em;
    transition: opacity 0.15s ease-in-out;
}

th.sortable:hover .sort-icon {
    opacity: 0.6;
}

th.sortable.sort-asc .sort-icon,
th.sortable.sort-desc .sort-icon {
    opacity: 1;
}

/* Dark table header variants - Bootstrap override */
.table-dark th.sortable:hover,
thead.table-dark th.sortable:hover,
thead.table-light th.sortable:hover,
.table > thead.table-dark th.sortable:hover,
.table > thead th.sortable:hover {
    background-color: #e89a28 !important;
}

.table-dark th.sortable,
thead.table-dark th.sortable,
.table > thead.table-dark th.sortable {
    color: #fff !important;
}

.table-dark th.sortable .sort-icon,
thead.table-dark th.sortable .sort-icon,
.table > thead.table-dark th.sortable .sort-icon {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

.table-dark th.sortable:hover .sort-icon,
thead.table-dark th.sortable:hover .sort-icon,
.table > thead.table-dark th.sortable:hover .sort-icon {
    color: #fff !important;
}

.table-dark th.sortable.sort-asc .sort-icon,
.table-dark th.sortable.sort-desc .sort-icon,
thead.table-dark th.sortable.sort-asc .sort-icon,
thead.table-dark th.sortable.sort-desc .sort-icon,
.table > thead.table-dark th.sortable.sort-asc .sort-icon,
.table > thead.table-dark th.sortable.sort-desc .sort-icon {
    color: #fff !important;
    opacity: 1 !important;
}

/* ===== Global Color Theme - Anket Renkleri ===== */
/* Başlıklar: #404040 (koyu gri) - Menüler/Sidebar */
/* Seçili/Panel başlıkları: #fba92d (turuncu) */

/* Admin Sidebar */
.sidebar.bg-dark {
    background-color: #404040 !important;
}

/* Tablo Başlıkları - Turuncu */
thead.table-dark,
thead.table-light,
.table > thead {
    background-color: #fba92d !important;
}

thead.table-dark th,
thead.table-light th,
.table > thead th {
    background-color: #fba92d !important;
    color: #fff !important;
    border-color: #fba92d !important;
}

/* Tüm Panel Başlıkları - Turuncu */
.card-header.bg-primary,
.card-header.bg-info,
.card-header.bg-secondary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-warning,
.card-header.bg-dark,
.card-header.bg-purple,
.card-header.bg-gradient,
.card-header.bg-white,
.card-header.bg-light {
    background-color: #fba92d !important;
    background-image: none !important;
    border-color: #fba92d !important;
    color: #fff !important;
}

.card-header.bg-white h5,
.card-header.bg-white h6,
.card-header.bg-light h5,
.card-header.bg-light h6,
.card-header.bg-white .mb-0,
.card-header.bg-light .mb-0 {
    color: #fff !important;
}

/* Tab Başlıkları - Turuncu (sadece içerik alanındaki tab'lar) */
.card .nav-tabs .nav-link,
.customer-content .nav-tabs .nav-link,
main .nav-tabs .nav-link {
    background-color: #fba92d !important;
    border-color: #fba92d !important;
    color: #fff !important;
}

.card .nav-tabs .nav-link.active,
.customer-content .nav-tabs .nav-link.active,
main .nav-tabs .nav-link.active {
    background-color: #d4890f !important;
    border-color: #d4890f !important;
    color: #fff !important;
}

.nav-tabs {
    border-bottom-color: #fba92d !important;
}
