/**
 * 108WP Content Protector Lite - Admin Styles
 * Version: 1.0.0
 */

/* ===================================
   MAIN LAYOUT
   =================================== */

.wp108-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f9fafb;
    margin-left: -20px;
    margin-top: -10px;
}

/* ===================================
   SIDEBAR
   =================================== */

.wp108-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 32px;
    height: calc(100vh - 32px);
}

.wp108-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.wp108-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wp108-logo h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.wp108-version {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.wp108-nav {
    flex: 1;
    padding: 16px 0;
    margin: 0;
    list-style: none;
    overflow-y: auto;
}

.wp108-nav li {
    margin: 0;
}

.wp108-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.wp108-nav li a:hover {
    background: #f3f4f6;
    color: #111827;
}

.wp108-nav li.active a {
    background: #f3f4f6;
    color: #9333ea;
    font-weight: 600;
    border-left: 3px solid #9333ea;
}

.wp108-nav li.disabled a {
    opacity: 0.5;
}

.wp108-nav li a .dashicons {
    margin-right: 12px;
    font-size: 20px;
}

.wp108-nav li a .wp108-badge {
    margin-left: 10px;
}

.wp108-sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.wp108-upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
}

.wp108-upgrade-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.wp108-footer-text {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin: 12px 0 0 0;
}

.wp108-footer-text a {
    color: #9333ea;
    text-decoration: none;
}

/* ===================================
   MAIN CONTENT
   =================================== */

.wp108-content {
    flex: 1;
    padding: 32px;
}

.wp108-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.wp108-content-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.wp108-content-body {
    max-width: 1200px;
}

/* ===================================
   BADGES
   =================================== */

.wp108-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.wp108-badge-pro {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
}

.wp108-badge-pro-large {
    padding: 8px 16px;
    font-size: 14px;
}

/* ===================================
   CARDS
   =================================== */

.wp108-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.wp108-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.wp108-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.wp108-card-header p {
    margin: 4px 0 0 0;
    color: #6b7280;
    font-size: 14px;
}

.wp108-card-body {
    padding: 24px;
}

/* ===================================
   ALERTS
   =================================== */

.wp108-alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: start;
    gap: 12px;
}

.wp108-alert .dashicons {
    font-size: 24px;
    margin-top: 2px;
}

.wp108-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.wp108-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.wp108-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ===================================
   SETTINGS
   =================================== */

.wp108-settings-grid {
    display: grid;
    gap: 16px;
}

.wp108-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.wp108-setting-item.wp108-enabled {
    background: #ffffff;
    border-color: #9333ea;
}

.wp108-setting-info {
    flex: 1;
}

.wp108-setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.wp108-setting-label .dashicons {
    font-size: 18px;
}

.wp108-setting-label .dashicons-yes-alt {
    color: #22c55e;
}

.wp108-setting-label .dashicons-lock {
    color: #9ca3af;
}

.wp108-setting-desc {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* ===================================
   TOGGLE SWITCH
   =================================== */

.wp108-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.wp108-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 24px;
}

.wp108-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.wp108-toggle input:checked + .wp108-toggle-slider {
    background-color: #9333ea;
}

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

.wp108-toggle input:disabled + .wp108-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================
   BUTTONS
   =================================== */

.wp108-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.wp108-btn-primary {
    background: #9333ea;
    color: white;
}

.wp108-btn-primary:hover {
    background: #7e22ce;
    color: white;
}

.wp108-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.wp108-btn-secondary:hover {
    background: #e5e7eb;
}

.wp108-btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

.wp108-btn .dashicons {
    font-size: 18px;
}

.wp108-btn.is-saving,
.wp108-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.wp108-btn:disabled:hover {
    background: #9333ea;
}

.wp108-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===================================
   PRO FEATURE PAGES
   =================================== */

.wp108-pro-page {
    position: relative;
}

.wp108-pro-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp108-pro-lock-content {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.wp108-pro-lock-content .dashicons {
    font-size: 64px;
    color: #9333ea;
    width: 64px;
    height: 64px;
}

.wp108-pro-lock-content h2 {
    margin: 16px 0 8px 0;
    font-size: 24px;
    color: #111827;
}

.wp108-pro-lock-content p {
    color: #6b7280;
    margin-bottom: 24px;
}

.wp108-preview-blurred {
    opacity: 0.3;
    pointer-events: none;
}

.wp108-pro-cta {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    padding: 48px;
    border-radius: 12px;
    text-align: center;
    margin-top: 24px;
}

.wp108-pro-cta h3 {
    margin: 0 0 12px 0;
    font-size: 28px;
    color: white;
}

.wp108-pro-cta p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.wp108-check-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wp108-check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.wp108-check-list .dashicons {
    color: #22c55e;
    font-size: 24px;
}

/* ===================================
   DISABLED SECTIONS
   =================================== */

.wp108-card.wp108-disabled {
    position: relative;
    overflow: hidden;
}

.wp108-blurred {
    filter: blur(3px);
    opacity: 0.5;
    pointer-events: none;
}

.wp108-upgrade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(147, 51, 234, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.wp108-upgrade-content {
    text-align: center;
    color: white;
    padding: 32px;
}

.wp108-upgrade-content .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.wp108-upgrade-content h3 {
    color: white;
    margin: 0 0 12px 0;
    font-size: 24px;
}

.wp108-upgrade-content p {
    margin: 0 0 24px 0;
    opacity: 0.95;
}

/* ===================================
   DASHBOARD
   =================================== */

.wp108-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.wp108-stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.wp108-stat-card.wp108-stat-disabled {
    opacity: 0.6;
}

.wp108-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp108-stat-icon .dashicons {
    font-size: 28px;
    color: white;
    width: 28px;
    height: 28px;
}

.wp108-stat-content h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.wp108-stat-content p {
    margin: 4px 0 0 0;
    color: #6b7280;
    font-size: 14px;
}

.wp108-stat-note {
    font-size: 12px;
    color: #9ca3af;
}

.wp108-upgrade-card {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
}

.wp108-upgrade-hero {
    text-align: center;
    padding: 40px 24px 24px 24px;
}

.wp108-upgrade-hero .dashicons {
    font-size: 48px;
    color: #9333ea;
    width: 48px;
    height: 48px;
}

.wp108-upgrade-hero h2 {
    margin: 16px 0 8px 0;
    font-size: 28px;
    color: #111827;
}

.wp108-upgrade-hero p {
    color: #6b7280;
    margin: 0;
}

.wp108-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 24px;
}

.wp108-feature {
    display: flex;
    gap: 12px;
    align-items: start;
}

.wp108-feature .dashicons {
    color: #22c55e;
    font-size: 24px;
    flex-shrink: 0;
}

.wp108-feature strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.wp108-feature p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.wp108-upgrade-cta {
    text-align: center;
    padding: 24px;
    border-top: 1px solid #e5e7eb;
}

.wp108-upgrade-note {
    margin: 16px 0 0 0;
    font-size: 13px;
    color: #6b7280;
}

.wp108-steps {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
}

.wp108-steps li {
    counter-increment: step-counter;
    padding-left: 48px;
    position: relative;
    margin-bottom: 24px;
}

.wp108-steps li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: #9333ea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.wp108-steps strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.wp108-steps p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* ===================================
   UTILITIES
   =================================== */

.space-y-6 > * + * {
    margin-top: 24px;
}

.hidden {
    display: none !important;
}

.wp108-saving {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-weight: 600;
}

.wp108-spin {
    display: inline-block;
    animation: wp108-spin 0.9s linear infinite;
}

@keyframes wp108-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.wp108-code-editor {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.wp108-table {
    width: 100%;
    border-collapse: collapse;
}

.wp108-table th,
.wp108-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.wp108-table th {
    font-weight: 600;
    color: #111827;
    background: #f9fafb;
}

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

@media (max-width: 768px) {
    .wp108-wrapper {
        flex-direction: column;
    }
    
    .wp108-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .wp108-content {
        padding: 16px;
    }
    
    .wp108-stats-grid {
        grid-template-columns: 1fr;
    }
}
