/**
 * FlynCache Admin Styles
 *
 * @package FlynCache
 * @since 1.0.0
 */

/* Header */
.flyncache-wrap {
    max-width: 960px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.flyncache-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 12px;
    color: #fff;
}

.flyncache-logo-area h1 {
    margin: 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flyncache-logo-icon {
    font-size: 32px;
}

.flyncache-title {
    font-weight: 700;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flyncache-version {
    font-size: 11px;
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 400;
}

.flyncache-tagline {
    margin: 4px 0 0 0;
    opacity: 0.7;
    font-size: 13px;
}

.flyncache-header-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tabs */
.flyncache-tabs {
    margin-bottom: 20px;
}

.flyncache-tabs .nav-tab {
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
}

.flyncache-tabs .nav-tab-active {
    background: #fff;
    border-bottom-color: #fff;
    font-weight: 600;
}

/* Cards */
.flyncache-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.flyncache-card h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flyncache-card h3 {
    margin: 20px 0 10px 0;
    font-size: 16px;
    color: #2271b1;
}

.flyncache-card hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}

.flyncache-card-primary {
    border-left: 4px solid #2271b1;
}

.flyncache-card-accent {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.flyncache-card-danger {
    border-left: 4px solid #ef4444;
}

.flyncache-card-coffee {
    border-left: 4px solid #FF813F;
    background: #fff7ed;
}

/* Buttons */
.flyncache-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
}

.flyncache-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.flyncache-btn-primary {
    background: #2271b1;
    color: #fff;
}
.flyncache-btn-primary:hover {
    background: #135e96;
    color: #fff;
}

.flyncache-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
}
.flyncache-btn-secondary:hover {
    background: #dcdcde;
    color: #1d2327;
}

.flyncache-btn-danger {
    background: #d63638;
    color: #fff;
}
.flyncache-btn-danger:hover {
    background: #b32d2e;
    color: #fff;
}

.flyncache-btn-warning {
    background: #f59e0b;
    color: #fff;
}
.flyncache-btn-warning:hover {
    background: #d97706;
    color: #fff;
}

.flyncache-btn-coffee {
    background: #FF813F;
    color: #fff;
}
.flyncache-btn-coffee:hover {
    background: #e6702e;
    color: #fff;
}

.flyncache-btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* Toggle Switch */
.flyncache-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}

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

.flyncache-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.flyncache-toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.flyncache-toggle input:checked + .flyncache-toggle-slider {
    background: #2271b1;
}

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

/* Badges */
.flyncache-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.flyncache-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.flyncache-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.flyncache-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.flyncache-badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.flyncache-detected-badge {
    margin-left: 8px;
    vertical-align: middle;
}

/* Status Table */
.flyncache-status-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.flyncache-status-table th {
    text-align: left;
    padding: 10px 15px;
    font-weight: 600;
    color: #50575e;
    font-size: 13px;
    width: 30%;
    border-bottom: 1px solid #e2e8f0;
}

.flyncache-status-table td {
    padding: 10px 15px;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
    color: #1d2327;
}

/* Cache Grid */
.flyncache-cache-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.flyncache-cache-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.2s;
}

.flyncache-cache-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34,113,177,0.1);
}

.flyncache-cache-item h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #1d2327;
}

.flyncache-cache-item p {
    margin: 4px 0;
    font-size: 12px;
    color: #646970;
}

.flyncache-cache-active,
.flyncache-cache-plugin_active,
.flyncache-cache-dir_found {
    border-left: 3px solid #10b981;
}

.flyncache-cache-dropin_detected {
    border-left: 3px solid #f59e0b;
}

/* Notices */
.flyncache-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.flyncache-notice-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.flyncache-notice-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.flyncache-notice-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Form Table Override */
.flyncache-form-table th {
    vertical-align: top !important;
}

.flyncache-form-table .description {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.flyncache-detected-path {
    color: #059669 !important;
    font-weight: 500;
}

/* Info Box */
.flyncache-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
}

.flyncache-info-box h4 {
    margin: 0 0 8px 0;
    color: #1e40af;
}

.flyncache-info-box ol {
    margin: 0;
    padding-left: 20px;
}

.flyncache-info-box li {
    margin: 4px 0;
    font-size: 13px;
    color: #374151;
}

/* Quick Actions */
.flyncache-quick-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Purge Section */
.flyncache-purge-section {
    margin: 15px 0;
}

.flyncache-purge-status,
.flyncache-test-status,
.flyncache-detect-status {
    font-size: 13px;
    margin-left: 10px;
    font-weight: 500;
}

.flyncache-purge-status.success,
.flyncache-test-status.success,
.flyncache-detect-status.success {
    color: #059669;
}

.flyncache-purge-status.error,
.flyncache-test-status.error,
.flyncache-detect-status.error {
    color: #dc2626;
}

/* Quick Purge Grid */
.flyncache-quick-purge-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Support Actions */
.flyncache-support-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Footer */
.flyncache-footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #646970;
    font-size: 12px;
}

.flyncache-footer a {
    color: #2271b1;
    text-decoration: none;
}

.flyncache-footer a:hover {
    text-decoration: underline;
}

.flyncache-footer-support {
    margin-top: 5px;
}

.flyncache-coffee-link {
    color: #FF813F !important;
    font-weight: 600;
}

/* Debug Info */
.flyncache-debug-info {
    background: #1d2327;
    color: #72aee6;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 400px;
}

/* Responsive */
@media (max-width: 782px) {
    .flyncache-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .flyncache-header-links {
        justify-content: center;
    }

    .flyncache-cache-grid {
        grid-template-columns: 1fr;
    }

    .flyncache-quick-actions,
    .flyncache-support-actions {
        justify-content: center;
    }
}
