/**
 * Frontend Styles — Shortcode [rcg_generator]
 * @package Redirect_CodeGen
 */

/* ─── Container ──────────────────────────────────────────────────────── */
.rcg-sc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 860px;
    margin: 24px auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    border: 1px solid #dde3ef;
}

/* ─── Header ─────────────────────────────────────────────────────────── */
.rcg-sc-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0d6efd 100%);
    color: #fff;
    text-align: center;
    padding: 32px 24px 24px;
}

.rcg-sc-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 10px;
}

.rcg-sc-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #fff !important;
    border: none !important;
    padding: 0 !important;
}

.rcg-sc-desc {
    margin: 0 !important;
    opacity: .85;
    font-size: 14px;
    line-height: 1.5;
}

/* ─── Body ───────────────────────────────────────────────────────────── */
.rcg-sc-body {
    background: #f8fafc;
    padding: 24px;
}

/* ─── Controls Row ───────────────────────────────────────────────────── */
.rcg-sc-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .rcg-sc-controls { grid-template-columns: 1fr; }
}

.rcg-sc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.rcg-sc-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.rcg-sc-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,.12);
    outline: none;
}

/* ─── Input Area ─────────────────────────────────────────────────────── */
.rcg-sc-input-wrap {
    margin-bottom: 16px;
}

.rcg-sc-label {
    display: block !important;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.rcg-sc-hint {
    font-weight: 400;
    font-style: italic;
    color: #6b7280;
    font-size: 11px;
    margin-left: 4px;
}

.rcg-sc-example {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: #1e40af;
    margin-bottom: 8px;
}

.rcg-sc-example code {
    background: #dbeafe;
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.rcg-sc-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.7;
    resize: vertical;
    min-height: 160px;
    color: #1f2937;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.rcg-sc-textarea:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13,110,253,.12);
    outline: none;
}

.rcg-sc-counter {
    font-size: 11px;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}

/* ─── Generate Button ────────────────────────────────────────────────── */
.rcg-sc-btn-generate {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all .25s;
    letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(13,110,253,.3);
    margin-bottom: 20px;
}

.rcg-sc-btn-generate:hover {
    background: linear-gradient(135deg, #0b5ed7, #084298);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13,110,253,.4);
}

.rcg-sc-btn-generate:active {
    transform: translateY(0);
}

.rcg-sc-btn-generate:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rcg-sc-btn-icon {
    font-size: 18px;
}

/* ─── Output ─────────────────────────────────────────────────────────── */
.rcg-sc-output-wrap {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fff;
}

.rcg-sc-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    flex-wrap: wrap;
    gap: 10px;
}

.rcg-sc-output-meta {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.rcg-sc-output-btns {
    display: flex;
    gap: 8px;
}

.rcg-sc-btn-copy,
.rcg-sc-btn-download {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.rcg-sc-btn-copy {
    background: #16a34a;
    color: #fff;
}

.rcg-sc-btn-copy:hover { background: #15803d; }

.rcg-sc-btn-download {
    background: #7c3aed;
    color: #fff;
}

.rcg-sc-btn-download:hover { background: #6d28d9; }

.rcg-sc-code-block {
    background: #1e2937;
    color: #a8d8a8;
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    max-height: 380px;
    overflow-y: auto;
    border: none;
    border-radius: 0;
}

.rcg-sc-code-block code {
    background: transparent;
    color: inherit;
    font-size: inherit;
    padding: 0;
}

/* ─── Guide ──────────────────────────────────────────────────────────── */
.rcg-sc-guide {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
}

.rcg-sc-guide h3 {
    margin: 0 0 14px;
    font-size: 14px;
    color: #1e3a5f;
}

.rcg-sc-guide-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 560px) {
    .rcg-sc-guide-tabs { grid-template-columns: 1fr; }
}

.rcg-sc-guide-item {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}

.rcg-sc-guide-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}

.rcg-sc-guide-item p {
    margin: 0;
}

.rcg-sc-guide-item code {
    background: rgba(0,0,0,.07);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.rcg-sc-guide-apache {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
}

.rcg-sc-guide-nginx {
    background: #dcfce7;
    border-left: 4px solid #16a34a;
}

/* ─── Notice ─────────────────────────────────────────────────────────── */
.rcg-sc-notice {
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    margin-bottom: 14px;
}

.rcg-sc-notice-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.rcg-sc-notice-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

/* ─── Spinner ────────────────────────────────────────────────────────── */
.rcg-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rcg-spin .7s linear infinite;
    vertical-align: middle;
}

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

/* ─── CSV Import Button ──────────────────────────────────────────────── */
.rcg-sc-btn-csv {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    color: #374151;
    border: 2px dashed #d1d5db;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 10px;
    width: 100%;
    justify-content: center;
}

.rcg-sc-btn-csv:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: #eff6ff;
}
