/**
 * Admin CSS for File Permissions Reset plugin
 *
 * @package FilePermissionsReset
 */

/* Tab Navigation */
.nav-tab-wrapper {
    margin: 20px 0;
    border-bottom: 1px solid #ccc;
}

.nav-tab {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-bottom: none;
    color: #555;
    text-decoration: none;
    padding: 10px 15px;
    margin-right: 5px;
    display: inline-block;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    background: #fff;
    color: #333;
}

.nav-tab-active,
.nav-tab-active:hover {
    background: #fff;
    border-bottom-color: #fff;
    color: #000;
    margin-bottom: -1px;
    padding-bottom: 11px;
}

/* Compatibility Warning */
.notice.notice-error h3 {
    margin-top: 0;
    color: #d63638;
}

.notice.notice-error code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d63638;
    font-weight: 600;
}

.notice.notice-error ul {
    margin: 10px 0;
    padding-left: 20px;
}

.notice.notice-error li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Main Layout */
.resetfileperm-main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.resetfileperm-left-column {
    flex: 1;
    min-width: 0; /* Prevents flex item from growing beyond container */
}

.resetfileperm-right-column {
    flex: 0 0 400px; /* Fixed width for right column */
    position: sticky;
    top: 32px; /* Stick below admin bar */
}

/* Main plugin container */
.resetfileperm-system-info,
.resetfileperm-directory-selection,
.resetfileperm-progress-section,
.resetfileperm-scan-results,
.resetfileperm-error-log,
.resetfileperm-results-section,
.resetfileperm-help-section {
    margin-bottom: 30px;
}

/* System information table */
.resetfileperm-system-info .form-table th {
    width: 200px;
    padding-left: 0;
}

.resetfileperm-system-info .form-table td code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

.resetfileperm-permission {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

/* Status indicators */
.resetfileperm-status-ok {
    color: #46b450;
    font-weight: 600;
}

.resetfileperm-status-error {
    color: #dc3232;
    font-weight: 600;
}

/* Progress section */
.resetfileperm-progress-section {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
}

.resetfileperm-progress-container {
    position: relative;
    margin-bottom: 20px;
}

.resetfileperm-progress-bar {
    width: 100%;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.resetfileperm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 15px;
    transition: width 0.3s ease;
    position: relative;
}

.resetfileperm-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 30px 30px;
    }
}

.resetfileperm-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.resetfileperm-progress-details {
    text-align: center;
}

.resetfileperm-progress-details p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.resetfileperm-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.resetfileperm-stats span {
    font-size: 13px;
    color: #666;
}

.resetfileperm-stats strong {
    color: #333;
}

/* Scan results */
.resetfileperm-scan-results {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 15px;
}

.resetfileperm-scan-summary p {
    margin: 0;
    font-size: 14px;
}

/* Error log */
.resetfileperm-error-log {
    background: #fff2f2;
    border: 1px solid #ffb3b3;
    border-radius: 4px;
    padding: 15px;
}

.resetfileperm-error-messages {
    max-height: 300px;
    overflow-y: auto;
}

.resetfileperm-error-messages .notice {
    margin: 0;
}

.resetfileperm-error-messages ul {
    margin: 10px 0;
    padding-left: 20px;
}

.resetfileperm-error-messages li {
    margin-bottom: 5px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    word-break: break-all;
}

/* Results section */
.resetfileperm-results-section {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-radius: 4px;
    padding: 20px;
}

.resetfileperm-results-summary h3 {
    margin-top: 0;
    color: #2e7d2e;
}

.resetfileperm-results-summary ul {
    margin: 10px 0;
    padding-left: 20px;
}

.resetfileperm-results-summary li {
    margin-bottom: 8px;
}

/* Developer Profile Section */
.resetfileperm-developer-profile {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.resetfileperm-profile-content {
    background: #fff;
    margin: 0;
}

.resetfileperm-profile-card {
    padding: 25px;
}

.resetfileperm-profile-header {
    text-align: center;
    margin-bottom: 25px;
}

.resetfileperm-logo-container {
    margin-bottom: 20px;
}

.resetfileperm-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.resetfileperm-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    text-align: center;
    margin: 0;
    letter-spacing: 1px;
}

.resetfileperm-agency-text {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    text-align: center;
    margin: 8px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-style: normal;
}

.resetfileperm-profile-header h3 {
    color: #2c3e50;
    font-size: 20px;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.resetfileperm-tagline {
    color: #7f8c8d;
    font-size: 16px;
    font-style: italic;
    margin: 0;
}

.resetfileperm-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 0;
}

.resetfileperm-service-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resetfileperm-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.resetfileperm-service-item .dashicons {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.resetfileperm-service-item h4 {
    color: #2c3e50;
    font-size: 14px;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.resetfileperm-service-item p {
    color: #6c757d;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.resetfileperm-profile-cta {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e9ecef;
    margin-bottom: 25px;
}

.resetfileperm-cta-text {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.resetfileperm-contact-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.resetfileperm-contact-btn,
.resetfileperm-website-btn {
    padding: 12px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.3s ease !important;
    width: 100%;
    max-width: 280px;
    justify-content: center !important;
}

.resetfileperm-btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.resetfileperm-btn-line1 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.resetfileperm-btn-line2 {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
}

.resetfileperm-contact-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    text-shadow: none !important;
}

.resetfileperm-contact-btn:hover,
.resetfileperm-contact-btn:focus {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.resetfileperm-website-btn {
    background: #fff !important;
    border: 2px solid #667eea !important;
    color: #667eea !important;
}

.resetfileperm-website-btn:hover,
.resetfileperm-website-btn:focus {
    background: #667eea !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    text-decoration: none !important;
}

.resetfileperm-contact-btn .dashicons,
.resetfileperm-website-btn .dashicons {
    font-size: 16px;
}

/* Help section */
.resetfileperm-help-section {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px;
    margin-top: 30px;
}

.resetfileperm-help-content h3 {
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
}

.resetfileperm-help-content h3:first-child {
    margin-top: 0;
}

.resetfileperm-help-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.resetfileperm-help-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Button improvements */
.button .dashicons {
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1;
}

.button[disabled] .dashicons {
    opacity: 0.6;
}

/* Form table improvements */
.form-table th {
    font-weight: 600;
}

.form-table .description {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* Warning notice improvements */
.notice.notice-warning {
    border-left-color: #ffb900;
}

.notice.notice-warning p strong {
    color: #d63638;
}

.notice ul {
    margin: 10px 0;
    padding-left: 20px;
}

.notice li {
    margin-bottom: 5px;
}

/* Responsive design */
@media (max-width: 1200px) {
    .resetfileperm-main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .resetfileperm-right-column {
        flex: none;
        position: static;
        width: 100%;
    }
    
    .resetfileperm-service-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 782px) {
    .resetfileperm-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .resetfileperm-stats span {
        text-align: center;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .form-table th {
        border-bottom: none;
        padding-bottom: 5px;
    }
    
    .resetfileperm-system-info .form-table td code {
        display: block;
        margin: 5px 0;
        word-break: break-all;
    }
    
    /* Developer Profile Responsive */
    .resetfileperm-profile-card {
        padding: 15px;
    }
    
    .resetfileperm-service-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .resetfileperm-service-item {
        padding: 15px;
    }
    
    .resetfileperm-profile-cta {
        padding: 15px;
    }
    
    .resetfileperm-logo {
        max-width: 150px;
    }
}

/* Loading states */
.button.loading {
    position: relative;
    color: transparent !important;
}

.button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s ease infinite;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

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

/* Custom Success Alert */
.resetfileperm-success-alert {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #46b450;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
    margin: 15px 0;
    padding: 1px 12px;
}

.resetfileperm-success-alert p {
    margin: 0.5em 0;
    padding: 2px;
}

/* Accessibility improvements */
.resetfileperm-progress-bar:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .resetfileperm-progress-fill {
        background: #000;
    }
    
    .resetfileperm-status-ok {
        color: #000;
    }
    
    .resetfileperm-status-error {
        color: #000;
        background-color: #ff0;
        padding: 2px 4px;
    }
} 