/* Page-specific styles for subdomain-files.html */

/* Adjust margins for the file manager with sidebar */
.with-sidebar .file-manager-container {
    margin-left: 240px;
    transition: margin-left 0.3s ease;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .with-sidebar .file-manager-container {
        margin-left: 0;
    }
}

/* Additional file manager specific styling if needed */
.file-manager-header {
    padding: 1rem 2rem;
}

/* Ensure proper spacing for the file manager layout */
.file-manager-layout {
    padding: 0 2rem 2rem;
}

/* Sidebar title link styling */
.sidebar-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.sidebar-title-link:hover {
    opacity: 0.8;
}

.sidebar-title-link h3 {
    margin: 0;
    cursor: pointer;
}

/* Staging Panel Styles */
.staging-panel {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    display: none; /* Hidden by default */
}

.staging-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.staging-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.staging-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.status-text {
    font-weight: 500;
    color: #495057;
}

.staging-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.switch-label {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.environment-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.staging-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-staging {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-staging:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-staging-create {
    background: #28a745;
    color: white;
}

.btn-staging-create:hover:not(:disabled) {
    background: #218838;
}

.btn-staging-sync {
    background: #17a2b8;
    color: white;
}

.btn-staging-sync:hover:not(:disabled) {
    background: #138496;
}

.btn-staging-publish {
    background: #ffc107;
    color: #212529;
}

.btn-staging-publish:hover:not(:disabled) {
    background: #e0a800;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* WordPress Actions - unified style */
.wp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wp-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .staging-content {
        flex-direction: column;
        gap: 1rem;
    }

    .staging-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-staging {
        font-size: 12px;
        padding: 0.4rem 0.8rem;
    }
}

/* WordPress Info Panel - Accordion Styles */
.wp-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.wp-info-section {
    border-bottom: 1px solid #dee2e6;
}

.wp-info-section:last-child {
    border-bottom: none;
}

.wp-info-section h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #6c757d;
    cursor: pointer;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
    user-select: none;
}

.wp-info-section h4:hover {
    color: #495057;
}

.wp-info-section h4::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.2s ease;
}

.wp-info-section.collapsed h4::after {
    transform: rotate(-90deg);
}

.wp-info-content {
    padding-bottom: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.wp-info-section.collapsed .wp-info-content {
    max-height: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Status indicators */
.status-indicator.status-good {
    color: #28a745;
    font-weight: 500;
}

.status-indicator.status-warning {
    color: #ffc107;
    font-weight: 500;
}

.status-indicator.status-critical {
    color: #dc3545;
    font-weight: 500;
}

.status-indicator.status-neutral {
    color: #6c757d;
    font-weight: 500;
}

/* WP-CLI Sections - Simplified styling */
.wp-cli-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wp-cli-section h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 12px 0;
    color: #6c757d;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
}

.wp-cli-section .wp-actions {
    gap: 8px;
}


/* Health Check Panel - using standard info-item style */
.health-checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    /* Similar to .info-item but with button */
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.health-status {
    font-size: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.health-status.status-good {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.health-status.status-warning {
    background-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.health-status.status-critical {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.health-indicator label {
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    color: #495057;
    min-width: 80px;
}

.health-result {
    font-size: 11px;
    color: #6c757d;
    flex: 1;
    text-align: center;
    margin: 0 0.5rem;
}

.btn-mini {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: 500;
    min-width: 50px;
    transition: all 0.3s ease;
}

.wp-btn-scan {
    background: #007bff;
}

.wp-btn-scan:hover {
    background: #0056b3;
}

.wp-btn-perf {
    background: #28a745;
}

.wp-btn-perf:hover {
    background: #1e7e34;
}

.wp-btn-perm {
    background: #17a2b8;
}

.wp-btn-perm:hover {
    background: #117a8b;
}

.wp-btn-updates {
    background: #ffc107;
    color: #212529;
}

.wp-btn-updates:hover {
    background: #e0a800;
}


/* WordPress Panels - Unified Style */
.wp-control-panel, .wp-info-panel {
    /* Use same style as other info-cards */
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.wp-control-panel h3, .wp-info-panel h3 {
    /* Match standard info-card h3 style */
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wp-control-panel h3 svg, .wp-info-panel h3 svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* WordPress buttons using standard styles */
.wp-control-panel .btn {
    /* Inherit standard button styles from styles.css */
}

/* WordPress buttons - unified simple style like btn-secondary */
.wp-btn-cache,
.wp-btn-media,
.wp-btn-password,
.wp-btn-backup,
.wp-btn-database,
.wp-btn-maintenance,
.wp-btn-search-replace,
.wp-btn-user,
.wp-btn-update {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.wp-btn-cache:hover,
.wp-btn-media:hover,
.wp-btn-password:hover,
.wp-btn-backup:hover,
.wp-btn-database:hover,
.wp-btn-maintenance:hover,
.wp-btn-search-replace:hover,
.wp-btn-user:hover,
.wp-btn-update:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Progress notification styles */
.progress-notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.progress-notification {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    border: 1px solid #dee2e6;
}

.progress-message {
    margin-top: 1rem;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Progress indicator styles */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.progress-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WordPress Master Panel - Compact Version */
.wordpress-master-panel {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 1rem;
}

.wp-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.wp-compact-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.wp-compact-title svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.wp-version-badge {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.wp-compact-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.wp-info-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
    background: white;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.wp-info-chip svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.wp-updates-chip {
    border-color: #ffc107;
    background: #fff8e1;
    color: #f57c00;
}

.wp-compact-grid {
    display: flex;
    gap: 16px;
    align-items: center;
}

.wp-compact-actions {
    display: flex;
    gap: 6px;
    flex: 1;
}

.wp-compact-health {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.btn-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-compact:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-compact svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wp-health-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wp-health-badge:hover {
    background: #e9ecef;
}

.health-dot {
    font-size: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.health-dot.status-good {
    background-color: #28a745;
}

.health-dot.status-warning {
    background-color: #ffc107;
}

.health-dot.status-critical {
    background-color: #dc3545;
}

.wp-more-menu {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 4px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wp-more-menu .btn-compact {
    width: 100%;
    justify-content: flex-start;
    border: none;
    border-radius: 4px;
}

.wp-more-menu .btn-compact:hover {
    background: #f8f9fa;
}

/* Responsive adjustments for WordPress panels */
@media (max-width: 1200px) {
    .wp-compact-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .wp-compact-health {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .wordpress-master-panel {
        padding: 10px 12px;
    }

    .wp-compact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wp-compact-info {
        gap: 6px;
    }

    .wp-compact-actions {
        flex-wrap: wrap;
    }

    .btn-compact span {
        display: none;
    }

    .wp-health-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Alternative URL Section Styles */
.alternative-url-section {
    padding: 12px 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alternative-url-label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
    min-width: 140px;
}

.alternative-url-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.alternative-url-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.btn-settings {
    padding: 6px 12px;
    font-size: 13px;
    margin-left: auto;
}

/* Modal Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    user-select: none;
}

/* Config Modal Styles (if not already present) */
.config-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.config-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.config-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

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

.config-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.config-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* WordPress Details Grid */
.wp-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.wp-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.wp-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.wp-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.wp-item-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.wp-item-version {
    font-size: 12px;
    color: #6c757d;
}

.wp-item-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.wp-status-active {
    color: #28a745;
    font-weight: 500;
}

.wp-status-inactive {
    color: #6c757d;
}

.wp-status-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.wp-badge-active {
    background: #d4edda;
    color: #155724;
}

.wp-badge-update {
    background: #fff3cd;
    color: #856404;
}

.wp-backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wp-backup-info {
    flex: 1;
}

.wp-backup-date {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.wp-backup-size {
    font-size: 12px;
    color: #6c757d;
}

.wp-backup-actions {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 1200px) {
    .wp-details-grid {
        grid-template-columns: 1fr;
    }
}