/* Modern Settings Top Bar Design */

/* Top Bar Container */
.tk-area-settings .tk-top-bar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 25px 30px;
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.25);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Animated background pattern */
.tk-area-settings .tk-top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(1deg); }
    66% { transform: translate(20px, -10px) rotate(-1deg); }
}

/* Left Section */
.tk-area-settings .tk-top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    position: relative;
}

.settings-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.settings-header-icon:hover {
    transform: rotate(180deg) scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.settings-header-icon i {
    font-size: 24px;
    color: white;
}

.settings-header-text h2 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-header-text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Right Section */
.tk-area-settings .tk-top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
    position: relative;
}

/* Modern Search Box */
.modern-search-box {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    min-width: 300px;
}

.modern-search-box:hover,
.modern-search-box:focus-within {
    background: rgba(255, 255, 255, 0.95);
    border-color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.modern-search-box i {
    position: absolute;
    left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.modern-search-box:hover i,
.modern-search-box:focus-within i {
    color: #059669;
}

.modern-search-box input {
    background: transparent;
    border: none;
    padding: 12px 100px 12px 50px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    outline: none;
}

.modern-search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.modern-search-box:hover input,
.modern-search-box:focus-within input {
    color: #1f2937;
}

.modern-search-box:hover input::placeholder,
.modern-search-box:focus-within input::placeholder {
    color: #9ca3af;
}

.search-shortcut {
    position: absolute;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-family: monospace;
    transition: all 0.3s ease;
}

.modern-search-box:hover .search-shortcut,
.modern-search-box:focus-within .search-shortcut {
    background: #e5e7eb;
    color: #6b7280;
}

/* Modern Save Button */
.tk-save-changes-modern {
    background: white;
    color: #059669;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tk-save-changes-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tk-save-changes-modern:hover::before {
    width: 300px;
    height: 300px;
}

.tk-save-changes-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.tk-save-changes-modern:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.save-icon i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.tk-save-changes-modern:hover .save-icon i {
    transform: rotate(360deg);
}

.save-text {
    position: relative;
}

.save-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Success state */
.tk-save-changes-modern.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.tk-save-changes-modern.success .save-icon i::before {
    content: "\f00c"; /* Checkmark icon */
}

/* Loading state */
.tk-save-changes-modern.loading {
    background: #9ca3af;
    color: white;
    pointer-events: none;
    opacity: 0.8;
}

.tk-save-changes-modern.loading .save-icon,
.tk-save-changes-modern.loading .save-text {
    display: none;
}

.tk-save-changes-modern.loading .save-loading {
    display: block !important;
}

/* Search Dropdown Results */
.tk-search-dropdown-items {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    animation: slideDown 0.3s ease;
}

.tk-search-dropdown-items.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tk-search-dropdown-items .search-result {
    padding: 12px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tk-search-dropdown-items .search-result:hover {
    background: #f9fafb;
    padding-left: 25px;
}

.tk-search-dropdown-items .search-result i {
    color: #059669;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tk-area-settings .tk-top-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .tk-area-settings .tk-top-bar-left,
    .tk-area-settings .tk-top-bar-right {
        width: 100%;
    }
    
    .tk-area-settings .tk-top-bar-right {
        flex-direction: column;
        gap: 15px;
    }
    
    .modern-search-box {
        width: 100%;
        min-width: unset;
    }
    
    .tk-save-changes-modern {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .settings-header-text h2 {
        font-size: 24px;
    }
    
    .settings-header-icon {
        width: 48px;
        height: 48px;
    }
    
    .settings-header-icon i {
        font-size: 20px;
    }
    
    .search-shortcut {
        display: none;
    }
}

/* RTL Support */
[dir="rtl"] .tk-area-settings .tk-top-bar-left {
    flex-direction: row-reverse;
}

[dir="rtl"] .modern-search-box i {
    left: auto;
    right: 20px;
}

[dir="rtl"] .modern-search-box input {
    padding: 12px 50px 12px 100px;
}

[dir="rtl"] .search-shortcut {
    right: auto;
    left: 15px;
}