@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600&family=Sora:wght@600;700&display=swap');

:root {
    --adminlgb-bg: #f0f0f1;
    --adminlgb-card-bg: #ffffff;
    --adminlgb-border: rgba(15, 23, 42, 0.06);
    --adminlgb-accent: #6167F8;
    --adminlgb-accent-2: #9965FF;
    --adminlgb-primary: #6167F8;
    --adminlgb-text: #0f172a;
    --adminlgb-muted-text: #6b7280;
    --adminlgb-radius: 8px;
    --adminlgb-shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.adminlgb-settings-wrap {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: none;
    margin: 0;
    padding: 10px 20px 60px 0;
}

.adminlgb-settings-wrap h1,
.adminlgb-settings-wrap h2,
.adminlgb-settings-wrap h3,
.adminlgb-settings-wrap h4,
.adminlgb-settings-wrap h5,
.adminlgb-settings-wrap h6 {
    font-family: 'Sora', sans-serif;
}

.adminlgb-settings-wrap h1 {
    font-weight: 700;
    color: var(--adminlgb-text);
    margin-bottom: 8px;
}

.adminlgb-intro {
    font-size: 15px;
    /* Increased font size */
    color: var(--adminlgb-muted-text);
    margin: 0 0 24px 0;
    max-width: 800px;
    line-height: 1.6;
}

/* New Grid Layout */
.adminlgb-dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar Navigation */
.adminlgb-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.adminlgb-nav-menu {
    background: var(--adminlgb-card-bg);
    border: 1px solid var(--adminlgb-border);
    border-radius: var(--adminlgb-radius);
    padding: 16px 0;
    box-shadow: var(--adminlgb-shadow-sm);
}

.adminlgb-nav-menu-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 24px 12px 24px;
}

.adminlgb-nav-tab-wrapper {
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    border: none;
    padding: 0;
}

.adminlgb-nav-tab-wrapper .nav-tab {
    font-family: 'Outfit', sans-serif;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    margin: 0;
    color: var(--adminlgb-muted-text);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.adminlgb-nav-tab-wrapper .nav-tab:hover {
    background: #f8fafc;
    color: var(--adminlgb-text);
}

.adminlgb-nav-tab-wrapper .nav-tab-active,
.adminlgb-nav-tab-wrapper .nav-tab-active:hover {
    background: #f5f3ff;
    border-left: 3px solid #8b5cf6;
    color: #4c1d95;
}

.adminlgb-nav-tab-wrapper .nav-tab .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #94a3b8;
}

.adminlgb-nav-tab-wrapper .nav-tab-active .dashicons {
    color: #7c3aed;
}

.adminlgb-nav-tab-wrapper .nav-tab:hover .dashicons {
    color: #64748b;
}

.adminlgb-tab-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.adminlgb-tab-title {
    font-weight: 600;
    font-size: 14px;
}

.adminlgb-tab-text {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}

.adminlgb-nav-tab-wrapper .nav-tab-active .adminlgb-tab-title,
.adminlgb-nav-tab-wrapper .nav-tab-active .adminlgb-tab-text {
    color: #4c1d95;
}

.adminlgb-main-area {
    min-width: 0;
}

/* Cards */
.adminlgb-section-card {
    background: var(--adminlgb-card-bg);
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    overflow: hidden;
}

.adminlgb-section-card-header {
    padding: 30px 40px;
    border-bottom: 1px solid rgba(97, 103, 248, 0.08);
    background: #f8fafc;
}

.adminlgb-section-card-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--adminlgb-text);
}

.adminlgb-section-card-header .description {
    margin: 0;
    font-size: 14px;
    color: var(--adminlgb-muted-text);
}

.adminlgb-section-body {
    padding: 30px 40px;
}



/* Forms */
.adminlgb-settings-wrap table.form-table {
    margin-top: 0;
}

.adminlgb-settings-wrap table.form-table th {
    padding: 20px 10px 20px 0;
    font-weight: 500;
    color: var(--adminlgb-text);
}

.adminlgb-settings-wrap table.form-table td {
    padding: 15px 10px;
}

.adminlgb-settings-wrap input[type="text"],
.adminlgb-settings-wrap input[type="number"],
.adminlgb-settings-wrap input[type="url"],
.adminlgb-settings-wrap select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    font-size: 14px;
    color: #374151;
    min-width: 300px;
}

.adminlgb-settings-wrap input[type="text"]:focus,
.adminlgb-settings-wrap input[type="number"]:focus,
.adminlgb-settings-wrap input[type="url"]:focus,
.adminlgb-settings-wrap select:focus {
    border-color: var(--adminlgb-primary);
    box-shadow: 0 0 0 3px rgba(97, 103, 248, 0.1);
    outline: none;
}

/* Color Picker Input Fix */
.adminlgb-settings-wrap .wp-picker-container input[type="text"] {
    min-width: 0 !important;
    width: 65px !important;
    height: auto !important;
    padding: 0 5px !important;
    margin-left: 5px;
    font-size: 12px;
}

.adminlgb-settings-wrap .wp-picker-container .wp-color-result.button {
    margin: 0;
}

.adminlgb-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Toggles */
.adminlgb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.adminlgb-toggle input {
    display: none;
}

.adminlgb-toggle__slider {
    width: 44px;
    height: 24px;
    background: #e2e8f0;
    border-radius: 20px;
    position: relative;
    transition: 0.3s;
}

.adminlgb-toggle__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.adminlgb-toggle input:checked+.adminlgb-toggle__slider {
    background: var(--adminlgb-primary);
}

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

.adminlgb-toggle__label {
    font-size: 14px;
    color: var(--adminlgb-text);
}


/* Color Grid (Styles Tab) */
.adminlgb-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.adminlgb-color-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adminlgb-color-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--adminlgb-muted-text);
}

.adminlgb-radio-group {
    display: flex;
    gap: 20px;
}

.adminlgb-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* Sidebar Widget */


/* Helper Classes */
.adminlgb-image-preview-wrapper {
    margin-bottom: 10px;
}

.adminlgb-image-preview {
    max-width: 150px;
    border: 1px solid #e2e8f0;
    padding: 4px;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 8px;
}

.adminlgb-image-preview img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Sticky Actions */
.adminlgb-actions-sticky {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 15px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 15px;
}

.adminlgb-actions-sticky p.submit {
    margin: 0;
    padding: 0;
}

.adminlgb-actions-sticky .button-primary {
    background: linear-gradient(135deg, #6167F8, #9965FF) !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    box-shadow: 0 8px 20px rgba(97, 103, 248, 0.4) !important;
    letter-spacing: 0.5px !important;
    animation: adminlgb-pulse 2.5s infinite !important;
}

.adminlgb-actions-sticky .button-primary:hover {
    background: linear-gradient(135deg, #4f55e6, #844cff) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 24px rgba(97, 103, 248, 0.5) !important;
    animation: none !important;
}

@keyframes adminlgb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(97, 103, 248, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(97, 103, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(97, 103, 248, 0); }
}

/* Button Overrides */
/* Button Overrides */
.adminlgb-settings-wrap .button:not(.wp-color-result):not(.wp-picker-clear):not(.wp-picker-default),
.adminlgb-settings-wrap .button-primary:not(.wp-color-result),
.adminlgb-telemetry-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: linear-gradient(135deg, #6167F8, #9965FF) !important;
    border: none !important;
    color: #fff !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(97, 103, 248, 0.2) !important;
    text-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.adminlgb-settings-wrap .button:not(.wp-color-result):not(.wp-picker-clear):not(.wp-picker-default):hover,
.adminlgb-settings-wrap .button-primary:not(.wp-color-result):hover,
.adminlgb-telemetry-btn:hover {
    background: linear-gradient(135deg, #4f55e6, #844cff) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(97, 103, 248, 0.3) !important;
    color: #fff !important;
}

/* Responsive */
@media (max-width: 1000px) {
    .adminlgb-dashboard-layout {
        grid-template-columns: 1fr;
    }

    .adminlgb-sidebar-nav {
        position: static;
        margin-bottom: 30px;
    }

    .adminlgb-nav-tab-wrapper {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .adminlgb-settings-wrap {
        padding-right: 20px;
    }

    .adminlgb-actions-sticky {
        bottom: 20px;
        right: 20px;
        left: 20px;
        justify-content: center;
    }
}



/* Plugin cards */
.adminlgb-sidebar-widget {
    background: linear-gradient(180deg, rgba(97, 103, 248, 0.06), rgba(255, 255, 255, 0));
    border-radius: 20px;
    padding: 24px;
    box-shadow: inset 0 0 0 1px rgba(97, 103, 248, 0.08);
    margin-top: 20px;
}

.adminlgb-sidebar-widget h3 {
    margin: 0 0 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(97, 103, 248, 0.15);
}

.adminlgb-sidebar-widget__subtitle {
    margin: 6px 0 16px;
    color: #6b7280;
    font-size: 13px;
}

.adminlgb-plugin-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.18s ease;
}

.adminlgb-plugin-card--highlight {
    background: #fff;
    margin-top: 16px;
}

.adminlgb-plugin-card__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adminlgb-plugin-thumb__logo--under {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
}

.adminlgb-plugin-thumb__logo--under img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adminlgb-plugin-card__head {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.adminlgb-plugin-card__head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.adminlgb-plugin-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    color: var(--adminlgb-text);
}

.adminlgb-plugin-badge--cta {
    background: #9d72ff;
    color: #fff;
}

.adminlgb-plugin-card p {
    margin: 4px 0 12px 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.adminlgb-plugin-card__meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--adminlgb-muted-text);
    align-items: center;
    margin-top: 6px;
    margin-bottom: 8px;
}

.adminlgb-plugin-card__cta {
    display: flex;
    align-items: flex-start;
}

.adminlgb-plugin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: #6f59fa !important;
    text-decoration: none;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
}

.adminlgb-plugin-link:hover {
    background: #5d48e8 !important;
    transform: translateY(-1px);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Fix WP footer position to stay at the bottom of the page */
#wpfooter {
    position: relative !important;
    bottom: auto !important;
    clear: both !important;
    margin-top: 40px !important;
    display: block !important;
}

/* Dashboard Layout Wrapper */

/* Grid Layout for Inputs */
.adminlgb-grid-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.adminlgb-grid-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adminlgb-grid-item label {
    font-weight: 500;
    font-size: 13px;
    color: var(--adminlgb-text);
}

.adminlgb-grid-item input[type="text"],
.adminlgb-grid-item input[type="url"],
.adminlgb-grid-item input[type="number"] {
    width: 100%;
    min-width: 0 !important;
}

.adminlgb-grid-item .description {
    margin: 0;
    font-size: 12px;
    color: var(--adminlgb-muted-text);
}

/* Media Upload Group */
.adminlgb-media-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.adminlgb-media-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.adminlgb-image-preview-wrapper,
.adminlgb-video-preview-wrapper {
    margin-bottom: 0;
}

/* Styled Media Buttons */
.button.adminlgb_media-upload {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--adminlgb-text) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    height: auto !important;
    line-height: normal !important;
}

.button.adminlgb_media-upload:hover {
    border-color: var(--adminlgb-primary) !important;
    color: var(--adminlgb-primary) !important;
    background: #f8fafc !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(97, 103, 248, 0.1) !important;
}

.button.adminlgb_media-upload:active {
    transform: translateY(0);
}

.button.adminlgb_media-remove {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: #ef4444 !important;
    /* Red-500 */
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    height: auto !important;
    line-height: normal !important;
}

.button.adminlgb_media-remove:hover {
    background: #fef2f2 !important;
    /* Red-50 */
    border-color: #fee2e2 !important;
    /* Red-100 */
}

/* Telemetry Preference Redesign */

.adminlgb-telemetry-main-label {
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--adminlgb-text);
}

.adminlgb-telemetry-cards {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.adminlgb-telemetry-card {
    flex: 1;
    cursor: pointer;
    position: relative;
    padding: 0 !important;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex !important;
    flex-direction: column;
}

.adminlgb-telemetry-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.adminlgb-telemetry-card.is-active {
    border-color: #3b82f6;
    background: #f8faff;
}

.adminlgb-telemetry-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0 !important;
}

.adminlgb-telemetry-card-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.adminlgb-telemetry-card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.adminlgb-telemetry-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.adminlgb-telemetry-card.is-active .adminlgb-telemetry-radio-custom {
    border-color: var(--adminlgb-primary);
}

.adminlgb-telemetry-card.is-active .adminlgb-telemetry-radio-custom::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--adminlgb-primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.adminlgb-telemetry-card-titles strong {
    display: block;
    font-size: 16px;
    color: var(--adminlgb-text);
    margin-bottom: 4px;
}

.adminlgb-telemetry-card-titles p {
    margin: 0;
    font-size: 14px;
    color: var(--adminlgb-muted-text);
    line-height: 1.5;
}

.adminlgb-telemetry-card-divider {
    height: 1px;
    background: var(--adminlgb-border);
    margin: 20px 0;
}

.adminlgb-telemetry-card-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--adminlgb-muted-text);
    line-height: 1.6;
}

@media (max-width: 782px) {
    .adminlgb-telemetry-cards {
        flex-direction: column;
    }
}