/* ==========================================================================
   Solid Red & Green SaaS Design - WooCommerce Anti-Fraud Guard
   ========================================================================== */

:root {
    --wc-afg-green: #059669;
    --wc-afg-green-hover: #047857;
    --wc-afg-red: #dc2626;
    --wc-afg-red-hover: #b91c1c;
    --wc-afg-bg: #f8fafc;
    --wc-afg-card-bg: #ffffff;
    --wc-afg-border: #cbd5e1;
    --wc-afg-text: #0f172a;
    --wc-afg-text-light: #475569;
}

.wrap.wc-afg-wrap {
    background: var(--wc-afg-bg);
    padding: 20px 30px 40px 0;
    max-width: 100% !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header Banner - Solid Green & Red Mix */
.wc-afg-header {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #991b1b 100%);
    color: #fff;
    padding: 35px 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wc-afg-header-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
}

.wc-afg-header-title i {
    font-size: 32px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 12px;
    color: #34d399;
}

.wc-afg-header-subtitle {
    font-size: 14px;
    color: #f1f5f9;
    margin: 8px 0 0 54px;
}

/* Layout Grid */
.wc-afg-layout-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Vertical Tabs */
.wc-afg-sidebar-tabs {
    width: 280px;
    background: var(--wc-afg-card-bg);
    border: 1px solid var(--wc-afg-border);
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.wc-afg-sidebar-tabs .nav-tab {
    background: transparent !important;
    border: none !important;
    color: var(--wc-afg-text-light) !important;
    padding: 14px 18px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border-radius: 10px !important;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.wc-afg-sidebar-tabs .nav-tab i {
    font-size: 18px;
    width: 20px;
    color: var(--wc-afg-text-light);
    text-align: center;
}

.wc-afg-sidebar-tabs .nav-tab:hover {
    background: #ecfdf5 !important;
    color: var(--wc-afg-green) !important;
}

.wc-afg-sidebar-tabs .nav-tab:hover i {
    color: var(--wc-afg-green);
}

.wc-afg-sidebar-tabs .nav-tab-active {
    background: var(--wc-afg-green) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}

.wc-afg-sidebar-tabs .nav-tab-active i {
    color: #fff !important;
}

/* Content Panel */
.wc-afg-content-panel {
    flex: 1;
    background: var(--wc-afg-card-bg);
    border: 1px solid var(--wc-afg-border);
    border-radius: 14px;
    padding: 35px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 550px;
}

.wc-afg-content-panel h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--wc-afg-text);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Form Inputs & Large Textarea for Custom Message */
.wc-afg-form .form-table th {
    width: 300px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.wc-afg-form .form-table td {
    padding: 16px 10px;
}

.wc-afg-form input[type="text"],
.wc-afg-form input[type="number"],
.wc-afg-form textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--wc-afg-border);
    background: #f8fafc;
    font-size: 14px;
    color: var(--wc-afg-text);
}

/* Custom Message Box Extra Large Size */
.wc-afg-custom-textarea {
    width: 100% !important;
    max-width: 600px !important;
    height: 90px !important;
    line-height: 1.5;
    resize: vertical;
}

.wc-afg-form input[type="color"] {
    width: 60px;
    height: 38px;
    border: 1px solid var(--wc-afg-border);
    border-radius: 8px;
    background: none;
    cursor: pointer;
    vertical-align: middle;
}

/* Inline Form */
.wc-inline-form {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--wc-afg-border);
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: center;
}

.wc-inline-form input[type="text"] {
    flex: 1;
    max-width: 400px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--wc-afg-border);
}

/* Tables */
.wp-list-table.widefat {
    border: 1px solid var(--wc-afg-border);
    box-shadow: none;
    border-radius: 10px;
    overflow: hidden;
}

.wp-list-table.widefat thead th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 1px solid var(--wc-afg-border);
}

.wp-list-table.widefat tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    color: #334155;
}

/* Solid Badges */
.wc-afg-badge-danger {
    background: #fee2e2;
    color: var(--wc-afg-red);
    border: 1px solid #fecaca;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.wc-afg-code {
    font-family: Consolas, monospace;
    font-size: 12px;
    background: #f1f5f9;
    color: var(--wc-afg-red);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.wc-afg-log-reason {
    color: #475569;
    font-style: italic;
}

/* Solid Green Toggle Switch */
.wc-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    vertical-align: middle;
}

.wc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .slider {
    background-color: var(--wc-afg-green);
}

input:checked + .slider:before {
    transform: translateX(24px);
}


/* ==========================================================================
   Centered Popup Modal Styling (Responsive Side-by-Side Buttons)
   ========================================================================== */
#wc-afg-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(5px);
    z-index: 9999999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    animation: wcAfgFadeIn 0.25s ease-out;
}

.wc-afg-modal-box {
    background: #ffffff !important;
    width: 90% !important;
    max-width: 450px !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    animation: wcAfgScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    margin: auto !important;
}

.wc-afg-modal-header {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    padding: 20px 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-bottom: 1px solid #fecaca !important;
}

.wc-afg-modal-header i {
    font-size: 22px !important;
}

.wc-afg-modal-body {
    padding: 24px !important;
    color: #1e293b !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
    text-align: left !important;
}

/* Footer Flex Layout to keep buttons side-by-side and responsive */
.wc-afg-modal-footer {
    padding: 16px 24px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Deep WhatsApp Button Style */
.wc-afg-whatsapp-btn {
    background: #128C7E !important; /* Deep WhatsApp Dark Green */
    color: #fff !important;
    padding: 11px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: background 0.2s !important;
    white-space: nowrap !important;
}

.wc-afg-whatsapp-btn:hover {
    background: #075E54 !important; /* Deeper hover tone */
    color: #fff !important;
}

.wc-afg-whatsapp-btn i {
    font-size: 16px !important;
}

/* OK Got It Button Style */
.wc-afg-modal-close-btn {
    background: #dc2626 !important;
    color: #fff !important;
    border: none !important;
    padding: 11px 20px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    flex: 1 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: background 0.2s !important;
    white-space: nowrap !important;
}

.wc-afg-modal-close-btn:hover {
    background: #b91c1c !important;
}

@keyframes wcAfgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wcAfgScaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Timer Box Style inside Popup */
.wc-afg-timer-box {
    margin-top: 15px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-afg-timer-box i {
    color: #dc2626;
    font-size: 15px;
}

#wc-afg-countdown {
    font-family: monospace;
    font-weight: 700;
    font-size: 14px;
    color: #b91c1c;
}