/* ==========================================================================
   FFC ADMIN SETTINGS - v3.0.0
   Unified styles for all settings tabs - NO INLINE STYLES
   ========================================================================== */

/* ==========================================================================
   BASE WRAPPER
   ========================================================================== */
.ffc-settings-wrap,
.ffc-settings-page {
    max-width: 1500px;
}

/* ==========================================================================
   CARDS - Consistent Layout
   ========================================================================== */
.ffc-settings-wrap .card,
.ffc-settings-page .card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    min-width: 255px;
    max-width: 1500px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.ffc-settings-wrap .card:last-child,
.ffc-settings-page .card:last-child {
    margin-bottom: 0;
}

.ffc-settings-wrap .card h2,
.ffc-settings-page .card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.ffc-settings-wrap .card h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.ffc-settings-wrap .card > p.description {
    margin-top: 0;
    margin-bottom: 15px;
    color: #646970;
}

/* ==========================================================================
   DANGER ZONE
   ========================================================================== */
.card.ffc-danger-zone {
    border-left: 4px solid #d63638;
}

.card.ffc-danger-zone h2 {
    color: #d63638;
    border-bottom-color: #fcebec;
}

/* ==========================================================================
   FORM TABLES
   ========================================================================== */
.ffc-settings-wrap .form-table {
    margin-top: 0;
}

.ffc-settings-wrap .form-table th,
.ffc-settings-page .form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
    font-weight: 600;
    vertical-align: top;
}

.ffc-settings-wrap .form-table td,
.ffc-settings-page .form-table td {
    padding: 15px 10px;
}

.ffc-settings-wrap .form-table .description {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
}

.ffc-settings-wrap .form-table fieldset .description {
    margin-top: 5px;
    margin-bottom: 15px;
    margin-left: 25px;
}

/* ==========================================================================
   STATISTICS BOXES
   ========================================================================== */
.ffc-stats-box {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
}

.ffc-stats-box table {
    width: 100%;
    max-width: 1000px;
    border-collapse: collapse;
}

.ffc-stats-box tr {
    border-bottom: 1px solid #dcdcde;
}

.ffc-stats-box tr:last-child {
    border-bottom: none;
}

.ffc-stats-box tr.alternate {
    background: rgba(255, 255, 255, 0.6);
}

.ffc-stats-box td {
    padding: 12px 0;
}

.ffc-stats-box td:first-child {
    width: 50%;
    font-weight: 600;
}

.ffc-stats-box .stat-value {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.ffc-stats-box .stat-value.success {
    color: #00a32a;
    font-weight: 600;
}

.ffc-stats-box .stat-value.info {
    color: #2271b1;
    font-weight: 600;
}

.ffc-stats-box .stat-value.warning {
    color: #f0b849;
    font-weight: 600;
}

/* ==========================================================================
   SMTP PROVIDER CARDS
   ========================================================================== */
.ffc-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.ffc-provider-card {
    background: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
}

.ffc-provider-card.gmail {
    border-left-color: #2271b1;
}

.ffc-provider-card.outlook {
    border-left-color: #00a0d2;
}

.ffc-provider-card.sendgrid {
    border-left-color: #9b51e0;
}

.ffc-provider-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.ffc-provider-card p {
    margin: 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* ==========================================================================
   CHECKBOX GROUPS
   ========================================================================== */
.ffc-checkbox-group {
    margin: 15px 0;
}

.ffc-checkbox-group label {
    display: block;
    margin-bottom: 10px;
}

.ffc-checkbox-group .checkbox-label-text {
    font-weight: 600;
}

.ffc-checkbox-group .checkbox-sublabel {
    color: #2271b1;
    font-weight: normal;
    font-size: 13px;
    margin-left: 5px;
}

.ffc-checkbox-group .description {
    margin-left: 30px;
    margin-top: 5px;
    font-size: 13px;
    color: #646970;
}

/* ==========================================================================
   COLLAPSIBLE SECTIONS
   ========================================================================== */
.ffc-collapsible-section {
    margin-top: 20px;
}

.ffc-collapsible-section.inline {
    margin-top: 15px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    overflow: hidden;
}

.ffc-collapsible-content {
    padding: 15px;
}

.ffc-collapsible-section.inline .ffc-collapsible-content {
    background: #f6f7f7;
}

/* ==========================================================================
   MIGRATION CARDS
   ========================================================================== */
.ffc-migration-card {
    margin-bottom: 20px;
}

.ffc-migration-card.ffc-migration-complete .postbox-header {
    background: #d4edda;
    border-color: #00a32a;
}

.ffc-migration-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.ffc-migration-stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.ffc-migration-stat-value {
    font-size: 24px;
    font-weight: 700;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: #1d2327;
}

.ffc-migration-stat-value.success {
    color: #00a32a;
}

.ffc-migration-stat-value.pending {
    color: #f0b849;
}

.ffc-migration-stat-value.info {
    color: #2271b1;
}

.ffc-migration-progress-bar {
    margin: 20px 0;
}

.ffc-progress-bar-container {
    position: relative;
    width: 100%;
    height: 30px;
    background: #f0f0f1;
    border-radius: 15px;
    overflow: hidden;
}

.ffc-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    transition: width 0.3s ease;
    position: relative;
}

.ffc-progress-bar-fill.complete {
    background: linear-gradient(90deg, #00a32a 0%, #008a20 100%);
}

.ffc-progress-bar-fill.pending {
    background: linear-gradient(90deg, #f0b849 0%, #dba617 100%);
}

.ffc-progress-bar-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.ffc-progress-bar-label.light {
    color: #1d2327;
}

.ffc-progress-bar-label.dark {
    color: #fff;
}

.ffc-migration-actions {
    margin-top: 20px;
}

.ffc-migration-help {
    background: #f6f7f7;
}

/* ==========================================================================
   RATE LIMIT STYLES
   ========================================================================== */
.ffc-rate-limit-wrap .card {
    margin-bottom: 20px;
}

.ffc-rate-limit-wrap .card h2,
.ffc-rate-limit-wrap h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.ffc-rate-limit-wrap .card > p {
    margin-bottom: 15px;
}

/* Rate limit notice banner */
.ffc-rate-limit-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ffc-rate-limit-icon {
    font-size: 24px;
}

.ffc-rate-limit-message {
    flex: 1;
    color: #856404;
}

.ffc-rate-limit-message strong {
    color: #d63384;
    font-family: monospace;
}

/* Disabled submit buttons */
.ffc-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ✅ v3.1.0 Phase 3: Removed .ffc-rate-limit-stats (never rendered) */

/* ==========================================================================
   DOCUMENTATION TAB
   ========================================================================== */
/* ✅ v3.1.0: Documentation styles consolidated below (see line ~598) */

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
/* ✅ v3.1.0: Utilities moved to modular files
 * - Shared utilities (admin + frontend): ffc-common.css
 * - Admin-only utilities: ffc-admin-utilities.css
 */

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.ffc-settings-wrap .button {
    margin-right: 10px;
    margin-bottom: 5px;
}

.ffc-settings-wrap .button:last-child {
    margin-right: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media screen and (max-width: 782px) {
    .ffc-provider-grid,
    .ffc-migration-stats {
        grid-template-columns: 1fr;
    }
    
    .ffc-settings-wrap .form-table th {
        width: auto;
        padding: 10px 10px 0 0;
        display: block;
    }
    
    .ffc-settings-wrap .form-table td {
        padding: 10px 0;
        display: block;
    }
    
    .ffc-stats-box table {
        font-size: 13px;
    }
    
    .ffc-migration-stat-value {
        font-size: 20px;
    }
}

@media screen and (max-width: 1000px) {
    .ffc-settings-wrap .card {
        padding: 15px;
    }
    
    .ffc-provider-card,
    .ffc-stats-box {
        padding: 15px;
    }
}

/* ==========================================================================
   TRANSITIONS
   ========================================================================== */
.ffc-collapsible-content,
.ffc-provider-card,
.ffc-progress-bar-fill,
.card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
    .ffc-settings-wrap .button {
        display: none;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
        page-break-inside: avoid;
    }
}

/* ==========================================================================
   DOCUMENTATION TAB - COMPLETE STYLES
   ========================================================================== */

/* General Documentation Sections */
.ffc-doc-section {
    margin-bottom: 30px;
}

.ffc-doc-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.ffc-doc-section pre {
    background: #f6f7f7;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
    overflow-x: auto;
    font-size: 13px;
}

.ffc-doc-section code {
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.ffc-doc-section pre code {
    background: none;
    padding: 0;
}

/* Table of Contents */
.ffc-doc-toc {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid #2271b1;
    margin: 20px 0;
}

.ffc-doc-toc h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1d2327;
}

.ffc-doc-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.ffc-doc-toc-list li {
    margin: 0;
}

.ffc-doc-toc-list a {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border-radius: 4px;
    text-decoration: none;
    color: #2271b1;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #c3c4c7;
}

.ffc-doc-toc-list a:hover {
    background: #2271b1;
    color: #fff;
    transform: translateX(5px);
    border-color: #2271b1;
}

/* Documentation Examples */
.ffc-doc-example {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid #00a32a;
}

.ffc-doc-example h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #00a32a;
    font-size: 14px;
    font-weight: 600;
}

.ffc-doc-example pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
}

.ffc-doc-example code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.ffc-doc-example ul {
    margin: 10px 0 0 20px;
}

/* Code Tags */
code {
    background: #f6f7f7;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    color: #d63638;
    border: 1px solid #dcdcde;
}

pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* Documentation Lists */
.ffc-doc-list {
    list-style: none;
    padding: 0;
}

.ffc-doc-list li {
    padding: 10px 0 10px 30px;
    border-bottom: 1px solid #f0f0f1;
    position: relative;
}

.ffc-doc-list li:last-child {
    border-bottom: none;
}

.ffc-doc-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00a32a;
    font-weight: 700;
    font-size: 16px;
}

/* Alerts */
.ffc-alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid;
}

.ffc-alert p {
    margin: 0;
}

.ffc-alert-info {
    background: #d1ecf1;
    border-color: #2271b1;
    color: #0c5460;
}

/* ✅ v3.1.0 Phase 3: Removed unused alert variants
 * - .ffc-alert-warning (never rendered)
 * - .ffc-alert-success (never rendered)
 * - .ffc-alert-danger (never rendered)
 */

/* ✅ v3.1.0 Phase 3: Removed unused .ffc-doc-troubleshooting styles (never applied) */

/* Tables in Documentation */
.ffc-settings-wrap .widefat {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    overflow: hidden;
}

.ffc-settings-wrap .widefat thead th {
    background: #f6f7f7;
    font-weight: 600;
    padding: 12px;
}

.ffc-settings-wrap .widefat tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.ffc-settings-wrap .widefat tbody tr:last-child td {
    border-bottom: none;
}

.ffc-settings-wrap .widefat code {
    font-size: 12px;
}

/* Section Spacing */
.ffc-settings-wrap .card h3[id] {
    scroll-margin-top: 20px;
    padding-top: 5px;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .ffc-doc-toc-list {
        grid-template-columns: 1fr;
    }
    
    .ffc-doc-example pre {
        font-size: 12px;
        padding: 10px;
    }
}
/* ==========================================================================
   GEOLOCATION TAB STYLES - v3.0.0
   ========================================================================== */

/* Settings Section */
.ffc-settings-section {
    margin-bottom: 30px;
}

.ffc-settings-section h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.ffc-settings-section > .description {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

/* Info Box */
.ffc-info-box {
    background: #f0f6fc;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-top: 20px;
}

.ffc-info-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.ffc-info-box ul {
    margin-left: 20px;
    margin-bottom: 0;
}

.ffc-info-box li {
    margin-bottom: 8px;
}

.ffc-info-box strong {
    color: #0073aa;
}

/* Tab Content Container */
.ffc-settings-tab-content {
    max-width: 1500px;
}
