/* Admin Settings CSS - Moved from inline styles */

/* Template Grid Styles */
.ckfylt25-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.ckfylt25-template-card {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
    position: relative;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ckfylt25-template-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.ckfylt25-template-selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.ckfylt25-template-pro {
    opacity: 0.7;
}

.ckfylt25-template-preview {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ckfylt25-template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ckfylt25-template-pro-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ckfylt25-template-icon {
    font-size: 48px;
    color: white;
    opacity: 0.8;
}

.ckfylt25-template-info {
    padding: 12px;
    background: white;
}

.ckfylt25-template-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.ckfylt25-template-selection-actions {
    margin-top: 8px;
}

.ckfylt25-template-choose-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ckfylt25-template-choose-btn:hover {
    background: #5855eb;
    transform: translateY(-1px);
}

.ckfylt25-template-selected-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    width: 100%;
    cursor: default;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ckfylt25-template-pro-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.ckfylt25-template-pro-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ckfylt25-template-pro-actions .button {
    flex: 1;
    text-align: center;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ckfylt25-template-pro-actions .button-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.ckfylt25-template-pro-actions .button-secondary:hover {
    background: #e5e7eb;
}

.ckfylt25-template-pro-actions .button-primary {
    background: #6366f1;
    color: white;
    border: 1px solid #6366f1;
}

.ckfylt25-template-pro-actions .button-primary:hover {
    background: #5855eb;
}

/* Modal Styles */
.ckfylt25-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.ckfylt25-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.ckfylt25-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 5% auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ckfylt25-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.ckfylt25-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.ckfylt25-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ckfylt25-modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.ckfylt25-modal-body {
    padding: 0;
    overflow-y: auto;
    max-height: 70vh;
}

.ckfylt25-pro-notification {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    margin: 0;
}

.ckfylt25-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ckfylt25-notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ckfylt25-notification-text {
    flex: 1;
    line-height: 1.4;
}

.ckfylt25-notification-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.ckfylt25-pro-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ckfylt25-pro-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.ckfylt25-modal-image-container {
    padding: 25px;
    text-align: center;
    background: #f8f9fa;
}

.ckfylt25-modal-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .ckfylt25-modal-content {
        max-width: 95%;
        margin: 2% auto;
    }
    .ckfylt25-notification-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .ckfylt25-pro-link {
        align-self: center;
    }
}

/* Modern Admin Styles - Next.js Inspired */

/* PRO Badge Styles */
.ckfylt25-pro-badge {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PRO Tab Styles */
.ckfylt25-tab-pro {
    position: relative;
    opacity: 0.7;
}

.ckfylt25-tab-pro:hover {
    opacity: 1;
}

/* PRO Feature Locked Styles */
.ckfylt25-pro-feature-locked {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px dashed #e9ecef;
}

.ckfylt25-pro-feature-locked .button-primary {
    transition: all 0.3s ease;
}

.ckfylt25-pro-feature-locked .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.ckfylt25-admin-wrapper {
    background: #f8fafc;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.ckfylt25-admin-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: calc(100vh - 40px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.ckfylt25-admin-layout {
    display: flex;
    min-height: calc(100vh - 200px);
}

.ckfylt25-sidebar {
    width: 280px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.ckfylt25-sidebar.collapsed {
    width: 60px;
}

.ckfylt25-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.ckfylt25-sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.ckfylt25-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.2s ease;
    display: none; /* Hidden on desktop */
    visibility: hidden;
    opacity: 0;
}

.ckfylt25-sidebar-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.ckfylt25-sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.ckfylt25-sidebar-nav {
    padding: 20px 0;
}

.ckfylt25-nav-section {
    margin-bottom: 30px;
}

.ckfylt25-nav-section-title {
    margin: 0 0 15px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ckfylt25-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.ckfylt25-nav-link:hover {
    background: #f1f5f9;
    color: #1f2937;
    border-left-color: #6366f1;
}

.ckfylt25-nav-active {
    background: #eff6ff;
    color: #1f2937;
    border-left-color: #6366f1;
    font-weight: 500;
}

.ckfylt25-nav-pro {
    opacity: 0.7;
}

.ckfylt25-nav-pro:hover {
    opacity: 1;
}

.ckfylt25-nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.ckfylt25-main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.ckfylt25-sidebar.collapsed .ckfylt25-nav-section-title,
.ckfylt25-sidebar.collapsed .ckfylt25-nav-link span {
    display: none;
}

.ckfylt25-sidebar.collapsed .ckfylt25-nav-link {
    justify-content: center;
    padding: 12px;
}

.ckfylt25-sidebar.collapsed .ckfylt25-nav-icon {
    margin-right: 0;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .ckfylt25-sidebar-toggle {
        display: block !important; /* Show on mobile */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .ckfylt25-sidebar {
        width: 280px;
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        background: #f8fafc;
    }
    
    .ckfylt25-sidebar.collapsed {
        left: 0;
        width: 280px;
    }
    
    .ckfylt25-sidebar.collapsed .ckfylt25-nav-section-title,
    .ckfylt25-sidebar.collapsed .ckfylt25-nav-link span {
        display: block;
    }
    
    .ckfylt25-sidebar.collapsed .ckfylt25-nav-link {
        justify-content: flex-start;
        padding: 12px 20px;
    }
    
    .ckfylt25-sidebar.collapsed .ckfylt25-nav-icon {
        margin-right: 12px;
    }
    
    .ckfylt25-main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    /* Overlay when sidebar is open */
    .ckfylt25-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .ckfylt25-sidebar-overlay.active {
        display: block;
    }
    
    /* Ensure admin header is visible */
    .ckfylt25-admin-header {
        position: relative;
        z-index: 1001;
    }
    
    /* Force show toggle button on mobile */
    .ckfylt25-sidebar-header .ckfylt25-sidebar-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1002 !important;
    }
    
    /* Override any WordPress admin styles */
    button.ckfylt25-sidebar-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #f3f4f6 !important;
        border: 1px solid #d1d5db !important;
        color: #374151 !important;
        padding: 8px !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    button.ckfylt25-sidebar-toggle:hover {
        background: #e5e7eb !important;
        color: #1f2937 !important;
    }
}

.ckfylt25-admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem 2rem;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

.ckfylt25-admin-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.ckfylt25-admin-header-content {
    position: relative;
}

.ckfylt25-lite-features {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.ckfylt25-lite-features h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.ckfylt25-lite-features ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
    list-style: none;
}

.ckfylt25-lite-features li {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.ckfylt25-pro-upgrade {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    text-align: center;
}

.ckfylt25-pro-upgrade h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.ckfylt25-pro-upgrade p {
    margin: 0 0 15px 0;
    font-size: 14px;
    opacity: 0.9;
}

.ckfylt25-pro-button {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ckfylt25-pro-button:hover {
    background: #e55a2b;
    color: white;
    transform: translateY(-1px);
}

.ckfylt25-admin-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.ckfylt25-admin-icon {
    width: 2.25rem;
    height: 2.25rem;
    color: #fbbf24;
}

.ckfylt25-admin-subtitle {
    font-size: 1.125rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.ckfylt25-admin-tabs {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 32px;
    z-index: 100;
    border-radius: 0;
}

.ckfylt25-tab-navigation {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 0 2rem;
    max-width: 100%;
}

.ckfylt25-tab-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    font-size: 0.9rem;
}

.ckfylt25-tab-link:hover {
    color: #3b82f6;
    background: #f1f5f9;
}

.ckfylt25-tab-link.ckfylt25-tab-active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: #eff6ff;
}

.ckfylt25-tab-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

.ckfylt25-tab-content {
    padding: 2rem;
}

/* Form Styles */
.ckfylt25-form-section {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.ckfylt25-form-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ckfylt25-form-section h3::before {
    content: '';
    width: 3px;
    height: 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.ckfylt25-field-group {
    margin-bottom: 1.25rem;
}

.ckfylt25-field-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ckfylt25-field-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.ckfylt25-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.ckfylt25-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ckfylt25-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.ckfylt25-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ckfylt25-checkbox:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.ckfylt25-checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: #3b82f6;
}

.ckfylt25-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.ckfylt25-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ckfylt25-button-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 2px solid #e2e8f0;
}

.ckfylt25-button-secondary:hover {
    background: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card Styles */
.ckfylt25-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}

.ckfylt25-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.ckfylt25-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* WordPress Admin Compatibility */
.ckfylt25-admin-wrapper .wrap {
    margin: 0;
    padding: 0;
}

.ckfylt25-admin-wrapper .notice {
    margin: 1rem 2rem;
}

.ckfylt25-admin-wrapper .settings_errors {
    margin: 1rem 2rem;
}

/* Enhanced Form Styles */
.ckfylt25-form-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.ckfylt25-form-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Enhanced Tab Styles */
.ckfylt25-tab-link {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ckfylt25-tab-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.ckfylt25-tab-link:hover::before,
.ckfylt25-tab-active::before {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .ckfylt25-admin-container {
        margin: 0;
        border-radius: 0;
    }

    .ckfylt25-admin-header {
        padding: 1.5rem 1rem 2rem;
        border-radius: 0;
    }

    .ckfylt25-admin-title {
        font-size: 1.75rem;
    }

    .ckfylt25-tab-navigation {
        padding: 0 1rem;
    }

    .ckfylt25-tab-link {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .ckfylt25-tab-content {
        padding: 1rem;
    }

    .ckfylt25-form-section {
        padding: 1.25rem;
    }

    .ckfylt25-upgrade-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}