/* =============================================================
   Sadisi Content Writer — Front-End Styles (Dark Theme)
   Background:   #000000  pure black
   Surface:      #111111  cards
   Surface-2:    #1a1a1a  inputs
   Border:       #2e2e2e  subtle
   Text-primary: #f0f0f0
   Text-muted:   #888888
   Accent-blue:  #4a9eff
   Accent-green: #2ecc71
   Accent-gold:  #f0c040
   Accent-red:   #e05555
   ============================================================= */

.scw-fe-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #f0f0f0;
    background: #000000;
    padding: 8px 0 24px;
}

/* CARD */
.scw-fe-card {
    background: #111111;
    border: 1px solid #2e2e2e;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

.scw-fe-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #f0f0f0;
}

/* USAGE METER */
.scw-fe-meter {
    background: #111111;
    border: 1px solid #2e2e2e;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

.scw-fe-meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.scw-fe-plan-badge {
    background: #4a9eff;
    color: #000;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.scw-fe-reset-date {
    font-size: 12px;
    color: #888888;
}

.scw-fe-meter-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888888;
    margin: 14px 0 8px;
    border-bottom: 1px solid #2e2e2e;
    padding-bottom: 4px;
}

.scw-fe-addon-label {
    color: #f0c040;
    border-bottom-color: #3a3000;
}

.scw-fe-meter-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.scw-fe-meter-item { width: 100%; }

.scw-fe-meter-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #c0c0c0;
}

.scw-fe-bar-bg {
    width: 100%;
    height: 10px;
    background: #2e2e2e;
    border-radius: 6px;
    overflow: hidden;
}

.scw-fe-bar-fill       { height:100%; background:#4a9eff; border-radius:6px; transition:width 0.5s ease; }
.scw-fe-bar-posts      { background: #2ecc71; }
.scw-fe-bar-addon      { background: #f0c040; }
.scw-fe-bar-addon-posts{ background: #c9a020; }

.scw-fe-remaining {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #c0c0c0;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 6px;
}

.scw-fe-remaining strong { color: #4a9eff; }

.scw-fe-addon-link {
    font-size: 12px;
    font-weight: 600;
    color: #f0c040;
    text-decoration: none;
    border: 1px solid #f0c040;
    padding: 3px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.scw-fe-addon-link:hover { background: rgba(240,192,64,0.12); color: #f0c040; }

/* FORM FIELDS */
.scw-fe-form { display:flex; flex-direction:column; gap:18px; }
.scw-fe-field { display:flex; flex-direction:column; gap:6px; }

.scw-fe-field label { font-size:14px; font-weight:600; color:#c0c0c0; }
.scw-fe-required { color: #e05555; }
.scw-fe-word-hint { font-size:12px; font-weight:400; color:#4a9eff; margin-left:6px; }

.scw-fe-field input[type="text"],
.scw-fe-field input[type="number"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    font-size: 14px;
    color: #f0f0f0;
    background: #1a1a1a;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.scw-fe-field input[type="text"]::placeholder,
.scw-fe-field input[type="number"]::placeholder { color: #444444; }

.scw-fe-field input:focus {
    outline: none;
    border-color: #4a9eff;
    box-shadow: 0 0 0 2px rgba(74,158,255,0.2);
}

.scw-fe-field input:disabled {
    background: #0d0d0d;
    color: #333333;
    border-color: #1e1e1e;
    cursor: not-allowed;
}

.scw-fe-field-hint { font-size:12px; color:#555555; margin:0; line-height:1.5; }

/* BUTTONS */
.scw-fe-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
    text-align: center;
}

.scw-fe-btn:active { transform: scale(0.98); }

.scw-fe-btn-primary {
    background: #4a9eff;
    color: #000;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 6px;
    box-shadow: 0 0 20px rgba(74,158,255,0.2);
}

.scw-fe-btn-primary:hover:not(:disabled) {
    background: #2d7dd2;
    box-shadow: 0 0 28px rgba(74,158,255,0.4);
    color: #000;
}

.scw-fe-btn-primary:disabled {
    background: #1a1a1a;
    color: #333333;
    cursor: not-allowed;
    box-shadow: none;
}

.scw-fe-btn-secondary {
    background: #1a1a1a;
    color: #c0c0c0;
    border: 1px solid #2e2e2e;
}

.scw-fe-btn-secondary:hover { background: #222222; border-color: #3d3d3d; color: #f0f0f0; }

.scw-fe-btn-upgrade { background:#e05555; color:#fff; padding:11px 24px; display:inline-block; }
.scw-fe-btn-upgrade:hover { background:#c03a3a; color:#fff; }

.scw-fe-btn-addon { background:#f0c040; color:#000; padding:11px 24px; display:inline-block; }
.scw-fe-btn-addon:hover { background:#c9a020; color:#000; }

.scw-fe-btn-row { display:flex; align-items:center; gap:14px; margin-top:14px; flex-wrap:wrap; }

/* NOTICES */
.scw-fe-notice { padding:12px 16px; border-radius:6px; font-size:14px; margin-bottom:20px; line-height:1.6; }
.scw-fe-notice a { font-weight:600; text-decoration:underline; }

.scw-fe-notice-info {
    background: rgba(74,158,255,0.07);
    border: 1px solid rgba(74,158,255,0.25);
    color: #c0c0c0;
}
.scw-fe-notice-info a { color: #4a9eff; }

.scw-fe-notice-warning {
    background: rgba(240,192,64,0.07);
    border: 1px solid rgba(240,192,64,0.25);
    color: #c0c0c0;
}
.scw-fe-notice-warning a { color: #f0c040; }

.scw-fe-locked-msg { font-size:13px; color:#555555; margin:10px 0 0; text-align:center; }

/* LOADING */
.scw-fe-loading { display:flex; align-items:center; gap:14px; padding:16px 0 4px; font-size:14px; color:#888888; }

.scw-fe-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #2e2e2e;
    border-top-color: #4a9eff;
    border-radius: 50%;
    animation: scw-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes scw-spin { to { transform: rotate(360deg); } }

/* ERROR */
.scw-fe-error {
    border-color: #3a1010;
    background: #0e0505;
    color: #e05555;
    font-size: 14px;
    line-height: 1.6;
}
.scw-fe-error p { margin:0 0 12px; color:#e05555; }

/* OUTPUT */
.scw-fe-output-header { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:10px; margin-bottom:14px; }

.scw-fe-output-header h2 { font-size:18px; font-weight:700; margin:0; color:#2ecc71; }

.scw-fe-output-meta { display:flex; gap:8px; flex-wrap:wrap; }

.scw-fe-badge {
    background: rgba(74,158,255,0.1);
    border: 1px solid rgba(74,158,255,0.3);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #4a9eff;
}

.scw-fe-badge-green {
    background: rgba(46,204,113,0.1);
    border-color: rgba(46,204,113,0.3);
    color: #2ecc71;
}

#scw_fe_output,
#scw_fe_meta_desc,
#scw_fe_alt_text,
#scw_fe_internal_links {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    background: #0a0a0a;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    padding: 16px;
    resize: vertical;
    box-sizing: border-box;
    color: #d0d0d0;
}

#scw_fe_output:focus,
#scw_fe_meta_desc:focus,
#scw_fe_alt_text:focus,
#scw_fe_internal_links:focus {
    outline: none;
    border-color: #3d3d3d;
}

.scw-fe-copy-notice { font-size:13px; font-weight:600; color:#2ecc71; }

/* SEO BOXES */
.scw-fe-seo-box { border-left: 4px solid #4a9eff; }
.scw-fe-seo-box h3 { font-size:16px; font-weight:700; margin:0 0 6px; color:#4a9eff; }
.scw-fe-hint { font-size:12px; color:#555555; margin:0 0 12px; font-style:italic; }
.scw-fe-char-count { font-size:13px; font-weight:600; margin:6px 0 10px; }

/* RESPONSIVE */
@media (max-width: 600px) {
    .scw-fe-card { padding: 18px 16px; }
    .scw-fe-meter { padding: 16px; }
    .scw-fe-meter-header { flex-direction: column; align-items: flex-start; }
    .scw-fe-output-header { flex-direction: column; }
    .scw-fe-remaining { flex-direction: column; gap: 8px; }
    .scw-fe-btn-primary { font-size: 14px; padding: 12px; }
}

/* PERSISTENT ADDON BAR */
.scw-fe-addon-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(240,192,64,0.07);
    border: 1px solid rgba(240,192,64,0.25);
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.scw-fe-addon-bar-text {
    font-size: 13px;
    color: #c0a030;
    flex: 1;
    min-width: 180px;
}

.scw-fe-btn-addon-sm {
    padding: 8px 18px;
    font-size: 13px;
    white-space: nowrap;
}

/* WRITING STYLE TOGGLE */
.scw-fe-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #111111;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    padding: 14px 18px;
}

.scw-fe-toggle-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.scw-fe-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 160px;
}

.scw-fe-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: #c0c0c0;
}

.scw-fe-toggle-hint {
    font-size: 12px;
    color: #555555;
    line-height: 1.4;
}

.scw-fe-toggle-switch-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.scw-fe-toggle-option {
    font-size: 12px;
    font-weight: 600;
    color: #444444;
    transition: color 0.2s;
    white-space: nowrap;
}

.scw-fe-toggle-active {
    color: #4a9eff;
}

/* Toggle switch */
.scw-fe-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.scw-fe-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.scw-fe-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #2e2e2e;
    border-radius: 24px;
    transition: background 0.2s;
}

.scw-fe-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #888888;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.scw-fe-switch input:checked + .scw-fe-switch-slider {
    background: rgba(74,158,255,0.2);
}

.scw-fe-switch input:checked + .scw-fe-switch-slider:before {
    transform: translateX(20px);
    background: #4a9eff;
}
