/* RetentionFox Admin Settings Page Styles */

.rf-settings-wrap {
    max-width: 1200px;
    margin: 20px 0 60px 0;
    display: flex;
    gap: 24px;
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
}

.rf-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.rf-main {
    flex-grow: 1;
    min-width: 0;
}

.rf-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #4b5563;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.rf-nav-item:hover {
    background: #f9fafb;
    color: #111827;
}

.rf-nav-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.rf-nav-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.rf-section {
    display: none;
}

.rf-section.active {
    display: block;
    animation: rfFadeIn 0.2s ease-out;
}

@keyframes rfFadeIn {
    from {
        opacity: 0.9;
        transform: translateY(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rf-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
}

.rf-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 12px;
}

.rf-form-row {
    margin-bottom: 20px;
}

.rf-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.rf-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 5px;
    line-height: 1.4;
}

.rf-input {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    height: 40px;
}

.rf-input:focus {
    border-color: #2563eb;
    outline: 2px solid rgba(37, 99, 235, 0.1);
}

.rf-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    min-height: 80px;
    font-family: inherit;
    font-size: 14px;
}

.rf-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    vertical-align: middle;
    margin-right: 10px;
}

.rf-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.rf-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 34px;
}

.rf-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

input:checked + .rf-slider {
    background-color: #2563eb;
}

input:checked + .rf-slider:before {
    transform: translateX(18px);
}

input:disabled + .rf-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.rf-color-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="color"] {
    border: 1px solid #d1d5db;
    padding: 2px;
    height: 40px;
    width: 50px;
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
}

.rf-hex-val {
    font-family: monospace;
    color: #6b7280;
    font-size: 13px;
    background: #f9fafb;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Image preview box (for logo/icon upload) */
.rf-preview-img-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    text-align: center;
}

.rf-preview-img-box img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

/* Email template grid */
.rf-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.rf-tpl-item {
    position: relative;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.2s;
}

.rf-tpl-item:hover {
    border-color: #93c5fd;
}

.rf-tpl-item input {
    display: none;
}

.rf-tpl-item input:checked + img {
    border-color: #2563eb;
    opacity: 1;
}

.rf-tpl-item input:checked ~ .rf-tpl-name {
    background: #2563eb;
    color: #fff;
}

.rf-tpl-item input:disabled ~ img {
    opacity: 0.4;
    cursor: not-allowed;
}

.rf-tpl-item input:disabled ~ .rf-tpl-name {
    opacity: 0.5;
}

.rf-tpl-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #f1f5f9;
    display: block;
}

.rf-tpl-name {
    padding: 6px;
    font-size: 12px;
    text-align: center;
    font-weight: 600;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

/* Buttons */
.rf-btn-primary {
    background: #111827;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    font-size: 14px;
}

.rf-btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
}

.rf-btn-sec {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
}

.rf-btn-sec:hover {
    border-color: #9ca3af;
    color: #111827;
}

/* Pro badge */
.rf-pro-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Lock overlay for Pro features */
.rf-lock-overlay {
    position: relative;
}

.rf-lock-overlay::after {
    content: "🔒 PRO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(139, 92, 246, 0.95);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    pointer-events: none;
    z-index: 10;
}