/* Global Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary), sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: 1rem;
    font-size: var(--font-size-md);
}

a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Section */
.section {
    padding: var(--section-spacing) 0;
}

.section-title {
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: var(--font-size-2xl);
    margin-bottom: 20px;
    color: var(--accent-primary);
    position: relative;
    padding-bottom: 10px;
}

.section-subtitle h3 {
    font-size: var(--font-size-2xl);
    margin-bottom: 20px;
    color: var(--accent-primary);
    position: relative;
    padding-bottom: 10px;
}

.section-subtitle h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-primary);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--accent-primary);
}

.text-secondary {
    color: var(--accent-secondary);
}

.text-muted {
    color: var(--text-tertiary);
}

/* Spacing Utilities */
.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

/* Display Utilities */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

.flex-column {
    flex-direction: column !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .d-sm-none {
        display: none !important;
    }

    .d-sm-block {
        display: block !important;
    }

    .d-sm-flex {
        display: flex !important;
    }
}

/* Visibility */
.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.hidden {
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid var(--accent-tertiary);
    outline-offset: 2px;
}


/* Typed text */
.hero-subtitle {
    height: 1.8em; /* Fixed height - adjust based on your font size */
    margin-bottom: 1rem;
}

.typed-text {
    position: relative;
}

/* Cursor */
.typed-text::after {
    content: '|';
    display: inline-block;
    margin-left: 2px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.custom-tabs {
    margin-bottom: 30px;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--bg-tertiary);
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.tab-btn:hover {
    color: var(--accent-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Footer Actions */
.admin-footer-actions {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    align-items: center !important;
    min-height: 50px;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Clean, Modern Tabs */
.tabs-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.tabs-wrapper {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Scrollbar styling with rounded corners */
.tabs-wrapper::-webkit-scrollbar {
    height: 16px; /* Slightly taller for better visibility */
}

.tabs-wrapper::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px; /* Rounded track */
}

.tabs-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--accent-tertiary);
    border-radius: 10px; /* Rounded thumb */
}

.tabs-wrapper:hover::-webkit-scrollbar-thumb {
    background-color: var(--accent-secondary);
}

/* Firefox - note that Firefox handles rounded scrollbars differently */
.tabs-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-tertiary) transparent;
}

.tabs-list {
    display: flex;
    padding: 0.5rem 0;
}

.tab-item {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    border: none;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition-fast);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.tab-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab-item.active {
    background-color: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-item i {
    margin-right: 6px;
}

.tab-item adaptive-icon {
    height: 16px;
    width: 16px;
    margin-right: 6px;
}

/* Generic Toggle Component Styles */
.toggle-container {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.toggle-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

/* Switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-bottom: 0;
    margin-right: 0.5rem;
}

.toggle-switch .toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: var(--transition-fast);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

.toggle-input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Status text styling */
.toggle-status-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-right: 0.5rem;
}

.toggle-status-text.text-success {
    color: var(--success);
}

.toggle-status-text.text-muted {
    color: var(--text-tertiary);
}