/**
 * Incognito Admin Manager - Admin Theme Styler Styles
 *
 * @package Incognito_Admin_Manager
 * @since 1.0.0
 */

.ats-settings-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.ats-settings-main {
    flex: 1;
    max-width: 800px;
}

.ats-preview-sidebar {
    width: 380px;
    flex-shrink: 0;
}

.ats-preview-box {
    position: sticky;
    top: 40px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ats-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

.ats-preview-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ats-preview-title:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ba37;
    border-radius: 50%;
    animation: ats-pulse 2s infinite;
}

@keyframes ats-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.ats-preview-badge {
    font-size: 10px;
    background: #f0f0f1;
    color: #646970;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.ats-mini-preview {
    background: #f0f0f1;
    border-radius: 10px;
    overflow: hidden;
    font-size: 11px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    border: 1px solid #ddd;
}

/* Admin Bar Preview */
.ats-mini-adminbar {
    height: 32px;
    background: #1d2327;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
    transition: background 0.3s ease;
    position: relative;
}

.ats-mini-adminbar-item {
    color: #fff;
    font-size: 11px;
    opacity: 0.9;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.ats-mini-adminbar-item:hover {
    opacity: 1;
}

.ats-mini-adminbar-item.has-dropdown:after {
    content: '▾';
    font-size: 8px;
    margin-left: 4px;
    opacity: 0.7;
}

.ats-mini-adminbar-logo {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #1d2327;
    transition: all 0.3s ease;
}

.ats-mini-adminbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ats-mini-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 120px;
    background: #32373c;
    border-radius: 0 0 4px 4px;
    padding: 4px 0;
    display: none;
    z-index: 100;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: background 0.3s ease;
}

.ats-mini-adminbar-item:hover .ats-mini-dropdown {
    display: block;
}

.ats-mini-dropdown-item {
    padding: 6px 12px;
    font-size: 10px;
    color: #fff;
    opacity: 0.85;
    transition: all 0.15s ease;
}

.ats-mini-dropdown-item:hover {
    background: rgba(0,0,0,0.15);
    opacity: 1;
}

/* Admin Body Preview */
.ats-mini-body {
    display: flex;
    min-height: 260px;
}

/* Sidebar Preview */
.ats-mini-sidebar {
    width: 90px;
    background: #1d2327;
    padding: 12px 0;
    transition: background 0.3s ease;
}

.ats-mini-menu-logo {
    height: 40px;
    margin: 0 10px 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.ats-mini-menu-item {
    padding: 8px 12px;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.ats-mini-menu-item:before {
    content: '';
    width: 16px;
    height: 16px;
    background: currentColor;
    opacity: 0.6;
    border-radius: 3px;
    flex-shrink: 0;
}

.ats-mini-menu-item.active {
    opacity: 1;
}

.ats-mini-menu-item.active:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    opacity: 0.5;
}

.ats-mini-submenu {
    background: rgba(0,0,0,0.15);
    margin: 0;
    padding: 6px 0;
    display: none;
    transition: background 0.3s ease;
}

.ats-mini-menu-item.expanded + .ats-mini-submenu {
    display: block;
}

.ats-mini-submenu-item {
    padding: 5px 12px 5px 34px;
    font-size: 9px;
    color: #fff;
    opacity: 0.7;
    transition: all 0.15s ease;
}

.ats-mini-submenu-item:hover {
    opacity: 1;
}

/* Content Area Preview */
.ats-mini-content {
    flex: 1;
    padding: 16px;
    background: #f0f0f1;
}

.ats-mini-content-header {
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 12px;
}

.ats-mini-widget {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.ats-mini-widget-header {
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.3s ease;
}

.ats-mini-widget-header:before {
    content: '⋮⋮';
    opacity: 0.3;
    font-size: 10px;
}

.ats-mini-widget-body {
    padding: 12px;
}

.ats-mini-widget-placeholder {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f1 0%, #e8e8e8 50%, #f0f0f1 100%);
    border-radius: 3px;
    margin-bottom: 8px;
}

.ats-mini-widget-placeholder:last-child {
    margin-bottom: 0;
    width: 70%;
}

.ats-mini-btn {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.ats-mini-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.ats-mini-btn-secondary {
    background: #f0f0f1;
    color: #2271b1;
    border: 1px solid #2271b1;
    margin-left: 6px;
}

/* Color change indicator */
.ats-preview-flash {
    animation: ats-flash 0.4s ease;
}

@keyframes ats-flash {
    0% { box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34, 113, 177, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 113, 177, 0); }
}

/* Legend */
.ats-preview-legend {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.ats-preview-legend-title {
    font-size: 11px;
    font-weight: 600;
    color: #646970;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ats-preview-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ats-preview-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #646970;
    background: #f9f9f9;
    padding: 4px 8px;
    border-radius: 4px;
}

.ats-preview-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,0.1);
}

.ats-section-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.ats-section-card h2 {
    margin: 0 0 5px 0;
    padding: 0;
    font-size: 16px;
    color: #1d2327;
}

.ats-section-card .section-desc {
    color: #646970;
    font-size: 13px;
    margin: 0 0 20px 0;
}

.ats-section-card .form-table {
    margin: 0;
}

.ats-section-card .form-table th {
    padding: 12px 10px 12px 0;
    width: 200px;
}

.ats-section-card .form-table td {
    padding: 12px 0;
}

/* Responsive */
@media screen and (max-width: 1280px) {
    .ats-settings-wrapper {
        flex-direction: column;
    }

    .ats-preview-sidebar {
        width: 100%;
        max-width: 480px;
        order: -1;
        margin-bottom: 20px;
    }

    .ats-preview-box {
        position: static;
    }

    .ats-mini-body {
        min-height: 220px;
    }
}

@media screen and (max-width: 600px) {
    .ats-preview-sidebar {
        max-width: 100%;
    }

    .ats-mini-sidebar {
        width: 70px;
    }

    .ats-mini-menu-item span {
        display: none;
    }

    .ats-mini-menu-item:before {
        margin: 0 auto;
    }
}
