/**
 * Admin Styles for Zen Smart Folders
 *
 * @package ZenSmartFolders
 */

/* Dashboard Container */
.zensf-dashboard-container {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.zensf-dashboard-content {
    flex: 1;
    min-width: 0;
}

.zensf-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.zensf-dashboard-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.zensf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.zensf-card-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #23282d;
}

.zensf-card-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.zensf-card-content {
    padding: 10px 0;
}

.zensf-stat-number {
    font-size: 2.5em;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 5px;
}

.zensf-stat-label {
    color: #666;
    font-size: 14px;
}

.zensf-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.zensf-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    transition: all 0.2s ease;
}

.zensf-action-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.zensf-action-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.zensf-recent-activity {
    max-height: 400px;
    overflow-y: auto;
}

.zensf-no-activity {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
}

.zensf-activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.zensf-activity-item:last-child {
    border-bottom: none;
}

.zensf-activity-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 50%;
}

.zensf-activity-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.zensf-activity-content {
    flex: 1;
}

.zensf-activity-content p {
    margin: 0 0 5px 0;
    color: #23282d;
}

.zensf-activity-time {
    font-size: 12px;
    color: #999;
}

.zensf-folder-structure-tabs {
    margin-top: 20px;
}

.zensf-tab-nav {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.zensf-tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.zensf-tab-btn:hover {
    color: #0073aa;
    background: #f9f9f9;
}

.zensf-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    background: #f9f9f9;
}

.zensf-tab-content {
    display: none;
    padding: 15px 0;
}

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

.zensf-folder-overview {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.zensf-no-folders {
    padding: 30px;
    text-align: center;
    color: #666;
}

.zensf-folder-tree li {
    padding: 8px 0;
}

.zensf-folder-tree li > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.zensf-folder-children {
    padding-left: 30px;
    margin-top: 5px;
}

.zensf-folder-children li {
    padding: 5px 0;
}

.zensf-folder-count {
    color: #999;
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Pro Features Sidebar */
.zensf-pro-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.zensf-pro-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.zensf-pro-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.zensf-pro-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    color: #fff !important;
}

.zensf-pro-card p {
    margin: 0 0 25px 0;
    opacity: 0.95;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.zensf-pro-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    position: relative;
    z-index: 1;
}

.zensf-pro-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.zensf-pro-card ul li:last-child {
    padding-bottom: 0;
}

.zensf-pro-card a {
    display: inline-block;
    width: 100%;
    padding: 14px 25px;
    background: #fff;
    color: #667eea;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zensf-pro-card a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.zensf-hidden {
    display: none !important;
}

.zensf-dashboard-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.zensf-dashboard-title {
    font-size: 1.5em;
    margin: 0 0 10px 0;
}

.zensf-dashboard-description {
    color: #666;
    margin: 0;
}

/* Folder Meta Box */
.zensf-folder-meta-box {
    padding: 10px;
}

.zensf-folder-selector {
    margin-bottom: 15px;
}

.zensf-folder-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.zensf-folder-selector select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.zensf-assigned-folders {
    margin-top: 15px;
}

.zensf-assigned-folders ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zensf-assigned-folders li {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zensf-remove-folder {
    padding: 4px 8px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.zensf-remove-folder:hover {
    background: #b32d2d;
}

/* Folder Tree */
.zensf-folder-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zensf-folder-tree ul {
    list-style: none;
    padding-left: 20px;
    margin: 5px 0;
}

.zensf-folder-tree li {
    padding: 5px 0;
}

.zensf-folder-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.zensf-folder-item:hover {
    background: #f0f0f0;
}

.zensf-folder-toggle {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

.zensf-folder-toggle.collapsed {
    background: #f0f0f0;
}

.zensf-folder-select {
    margin-right: 10px;
}

.zensf-folder-name {
    flex: 1;
}

.zensf-folder-count {
    color: #999;
    font-size: 12px;
}

/* Search Container */
.zensf-search-container {
    position: relative;
    margin-bottom: 15px;
}

#zensf-folder-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#zensf-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.zensf-search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.zensf-search-result-item:hover {
    background: #f0f0f0;
}

.zensf-search-result-item:last-child {
    border-bottom: none;
}

.zensf-search-result-item .folder-name {
    font-weight: 600;
}

.zensf-search-result-item .folder-description {
    color: #666;
    font-size: 12px;
}

.zensf-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.zensf-error {
    padding: 10px;
    color: #dc3232;
    text-align: center;
}

.zensf-no-results {
    padding: 10px;
    color: #666;
    text-align: center;
}

/* Row Actions */
.zensf-row-action-assign,
.zensf-row-action-remove {
    color: #0073aa;
    text-decoration: none;
    margin-right: 5px;
}

.zensf-row-action-assign:hover,
.zensf-row-action-remove:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Modal */
.zensf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
}

.zensf-modal-content {
    position: relative;
    background: #fff;
    width: 500px;
    max-width: 90%;
    margin: 100px auto;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.zensf-modal-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.zensf-modal-title {
    margin: 0;
    font-size: 1.3em;
}

.zensf-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.zensf-modal-close:hover {
    color: #333;
}

.zensf-modal-body {
    margin-bottom: 20px;
}

.zensf-modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.zensf-modal-body select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.zensf-modal-footer {
    text-align: right;
}

.zensf-modal-actions {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.zensf-modal-actions .button {
    margin-left: 10px;
}

.zensf-modal-cancel,
.zensf-modal-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.zensf-modal-cancel {
    background: #f0f0f0;
    color: #333;
}

.zensf-modal-cancel:hover {
    background: #e0e0e0;
}

.zensf-modal-submit {
    background: #0073aa;
    color: #fff;
}

.zensf-modal-submit:hover {
    background: #005a87;
}

/* Folder Management */
.zensf-folder-management {
    padding: 20px;
}

.zensf-folder-list {
    margin-top: 20px;
}

.zensf-folder-item {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zensf-folder-item-info {
    flex: 1;
}

.zensf-folder-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.zensf-folder-item-description {
    color: #666;
    font-size: 14px;
}

.zensf-folder-item-actions {
    margin-left: 15px;
}

.zensf-edit-folder,
.zensf-delete-folder {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.zensf-edit-folder {
    background: #0073aa;
    color: #fff;
}

.zensf-edit-folder:hover {
    background: #005a87;
}

.zensf-delete-folder {
    background: #dc3232;
    color: #fff;
}

.zensf-delete-folder:hover {
    background: #b32d2d;
}

/* Forms */
.zensf-form-group {
    margin-bottom: 15px;
}

.zensf-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.zensf-form-group input[type="text"],
.zensf-form-group textarea,
.zensf-form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.zensf-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.zensf-form-actions {
    text-align: right;
    margin-top: 20px;
}

.zensf-form-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.zensf-form-actions .zensf-submit {
    background: #0073aa;
    color: #fff;
}

.zensf-form-actions .zensf-submit:hover {
    background: #005a87;
}

.zensf-form-actions .zensf-cancel {
    background: #f0f0f0;
    color: #333;
}

.zensf-form-actions .zensf-cancel:hover {
    background: #e0e0e0;
}

/* Drag and Drop */
.zensf-folder-handle {
    cursor: move;
    margin-right: 10px;
    color: #999;
}

.zensf-dragging {
    opacity: 0.5;
}

.zensf-drop-target {
    background: #e8f4f8;
    border: 2px dashed #0073aa;
}

/* Activity Log */
.zensf-activity-log {
    margin-top: 20px;
}

.zensf-activity-log-header {
    font-weight: 600;
    margin-bottom: 10px;
}

.zensf-activity-log-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.zensf-activity-log-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.zensf-activity-log-item:last-child {
    border-bottom: none;
}

.zensf-activity-log-time {
    color: #999;
    font-size: 12px;
}

.zensf-activity-log-action {
    margin-top: 5px;
}

/* Pro Features Detail Styles */
.zensf-pro-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.zensf-pro-features li {
    margin-bottom: 6px;
}

.zensf-pro-features li:last-child {
    margin-bottom: 0;
}

.zensf-pro-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.zensf-pro-feature:hover {
    transform: translateX(5px);
}

.zensf-pro-feature .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #fff;
}

.zensf-pro-feature-content {
    flex: 1;
}

.zensf-pro-feature-content strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff !important;
}

.zensf-pro-feature-desc {
    display: none;
}

.zensf-coming-soon-button {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px 25px;
    background: #fff;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.zensf-coming-soon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.zensf-support-card {
    background: #fff;
    color: #23282d;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.zensf-support-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #23282d;
}

.zensf-support-card p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.zensf-support-card a {
    color: #0073aa;
    text-decoration: none;
}

.zensf-support-card a:hover {
    text-decoration: underline;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .zensf-dashboard-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .zensf-pro-sidebar {
        width: 100%;
    }
    
    .zensf-modal-content {
        width: 95%;
        margin: 50px auto;
    }
    
    .zensf-folder-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .zensf-folder-item-actions {
        margin-left: 0;
        margin-top: 10px;
    }
}
