/**
 * Settings General - Enhanced Tab Styles v4.0
 * Outer Tabs ile Uyumlu - Unified Design Language
 * 
 * @author selcukmart
 * @version 4.0 - Enhanced & Unified
 * @date 2025-11-16
 * 
 * ÖNEMLİ: CSS class isimleri DEĞİŞMEDİ - Sadece stiller güncellendi
 */

/* ==========================================
   MAIN CONTAINER - ENHANCED
   ========================================== */

.mt-settings-tabbable-custom {
    background-color: #fff;
    border: none;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ==========================================
   TAB NAVIGATION - UNIFIED WITH OUTER TABS
   ========================================== */

.mt-settings-nav-tabs {
    background: #f8f9fa;
    border-radius: 14px 14px 0 0;
    padding: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9ecef;
    border-bottom: none;
    margin: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}

/* Subtle gradient background hint */
.mt-settings-nav-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(102, 126, 234, 0.02) 0%, transparent 100%);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}

.mt-settings-nav-tabs > li {
    margin-bottom: 0;
    flex: 1;
    min-width: 140px;
    position: relative;
}

/* INACTIVE TAB - Enhanced Visibility */
.mt-settings-nav-tabs > li > a {
    padding: 16px 22px;
    margin: 0;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: white;
    color: #495057;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.2px;
    display: block;
}

/* Inactive tab için subtle gradient hint */
.mt-settings-nav-tabs > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* HOVER STATE - Very Noticeable */
.mt-settings-nav-tabs > li > a:hover {
    background: white;
    color: #667eea;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.20);
}

.mt-settings-nav-tabs > li > a:hover::before {
    opacity: 1;
}

/* ACTIVE TAB - Maximum Visibility */
.mt-settings-nav-tabs > li.active > a,
.mt-settings-nav-tabs > li.active > a:hover,
.mt-settings-nav-tabs > li.active > a:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45),
                0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* Active tab için glow effect */
.mt-settings-nav-tabs > li.active > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px 2px 0 0;
}

/* Active tab için pulse animation */
@keyframes subtlePulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45),
                    0 0 0 4px rgba(102, 126, 234, 0.15);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5),
                    0 0 0 4px rgba(102, 126, 234, 0.2);
    }
}

.mt-settings-nav-tabs > li.active > a {
    animation: subtlePulse 3s ease-in-out infinite;
}

/* ==========================================
   API STATUS BADGES - ENHANCED
   ========================================== */

.api-status-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    vertical-align: middle;
}

.api-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.api-badge i {
    font-size: 12px;
    margin-right: 4px;
}

.api-badge.valid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.api-badge.default {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 5px 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

/* Active tab içindeki badge'ler için özel stil */
.mt-settings-nav-tabs > li.active .api-badge.valid {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mt-settings-nav-tabs > li.active .api-badge.default {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ==========================================
   TAB CONTENT AREA
   ========================================== */

.mt-settings-tab-content {
    background-color: #fff;
    border-radius: 0 0 16px 16px;
    padding: 0;
}

.mt-settings-form {
    padding: 30px;
}

/* Tab içerik geçiş animasyonu */
.mt-settings-tab-content > .tab-pane {
    animation: fadeInContent 0.5s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   CATEGORY INFO BOX - ENHANCED
   ========================================== */

.cst-category-info {
    margin-bottom: 25px;
}

.cst-category-info .alert {
    border-radius: 12px;
    border-left-width: 4px;
    font-weight: 500;
}

.cst-category-info .alert-info {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: #3b82f6;
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.cst-category-info .panel {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cst-category-info .panel-heading {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e9ecef;
}

.cst-category-info .panel-heading .panel-title a {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
}

.cst-category-info .panel-heading .panel-title a:hover {
    color: #764ba2;
}

/* ==========================================
   FORM ROWS - ENHANCED
   ========================================== */

.mt-settings-form-row {
    margin-bottom: 20px;
    padding: 25px 20px;
    background-color: white;
    border: 1px solid #f1f3f5;
    border-radius: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mt-settings-form-row:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.mt-settings-form-row:last-child {
    margin-bottom: 0;
}

/* ==========================================
   SPECIAL ROW - GRADIENT ENHANCED
   ========================================== */

.mt-settings-special-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.mt-settings-special-row:hover {
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.45);
    transform: translateY(-3px);
}

.mt-settings-special-row .mt-settings-label {
    color: #fff;
    font-weight: 800;
}

.mt-settings-special-row .mt-settings-help-text {
    color: rgba(255, 255, 255, 0.95);
}

.mt-settings-special-row .mt-settings-editable {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
}

.mt-settings-special-row .mt-settings-editable:hover {
    background-color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   GRID LAYOUT
   ========================================== */

.mt-settings-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mt-settings-col {
    position: relative;
}

/* ==========================================
   FORM ELEMENTS - ENHANCED
   ========================================== */

.mt-settings-label {
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
    display: block;
    font-size: 14px;
    letter-spacing: -0.2px;
}

.mt-settings-help-text {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.mt-settings-control {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================
   EDITABLE LINKS - GRADIENT STYLE
   ========================================== */

.mt-settings-editable {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    cursor: pointer;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    border: none !important;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.mt-settings-editable:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none;
}

.mt-settings-editable:active {
    transform: translateY(0);
}

/* ==========================================
   STATUS BADGES - GRADIENT ENHANCED
   ========================================== */

.mt-settings-status {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
    border: none;
}

.mt-settings-status.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.mt-settings-status.inactive {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.35);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 992px) {
    .mt-settings-nav-tabs > li {
        min-width: 120px;
    }

    .mt-settings-nav-tabs > li > a {
        padding: 14px 18px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .mt-settings-nav-tabs {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .mt-settings-nav-tabs > li {
        width: 100%;
        min-width: auto;
    }

    .mt-settings-nav-tabs > li > a {
        padding: 14px 20px;
        font-size: 14px;
    }

    .mt-settings-nav-tabs > li.active > a {
        transform: translateY(-2px);
    }

    .mt-settings-grid-2 {
        grid-template-columns: 1fr;
    }

    .mt-settings-control {
        flex-direction: column;
        align-items: flex-start;
    }

    .mt-settings-form {
        padding: 20px;
    }

    .mt-settings-form-row {
        padding: 20px 15px;
        margin: 0 0 15px 0;
    }

    .api-status-badges {
        margin-left: 0;
        margin-top: 6px;
        display: flex;
    }
}

@media (max-width: 480px) {
    .mt-settings-nav-tabs {
        padding: 6px;
        gap: 6px;
    }

    .mt-settings-nav-tabs > li > a {
        padding: 12px 16px;
        font-size: 13px;
    }

    .mt-settings-form-row {
        padding: 15px;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .mt-settings-tabbable-custom,
    .mt-settings-form-row {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }

    .mt-settings-editable {
        display: none;
    }

    .mt-settings-nav-tabs > li.active > a {
        animation: none;
    }
}

/* ==========================================
   ACCESSIBILITY & PERFORMANCE
   ========================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .mt-settings-nav-tabs > li.active > a {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mt-settings-nav-tabs > li > a {
        border-width: 3px;
    }

    .mt-settings-nav-tabs > li.active > a {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}

/* Focus visible for keyboard navigation */
.mt-settings-nav-tabs > li > a:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Bootstrap form-control override for consistency */
.mt-settings-form .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    /*padding: 10px 16px;*/
    transition: all 0.3s ease;
    font-size: 14px;
}

.mt-settings-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

/* Bootstrap switch toggle */
.mt-settings-form .bootstrap-switch {
    border-radius: 20px;
    border: 2px solid #e9ecef;
}

.mt-settings-form .bootstrap-switch.bootstrap-switch-on {
    border-color: #667eea;
}

.mt-settings-form .bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Select2 dropdown styling */
.mt-settings-form .select2-container--default .select2-selection--single {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    height: auto;
    padding: 8px 16px;
}

.mt-settings-form .select2-container--default .select2-selection--single:focus {
    border-color: #667eea;
}

/* Datepicker styling */
.mt-settings-form .datepicker table tr td.active.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
