/* PR Generator Premium Styles */

:root {
    --pr-gold-primary: #d4af37;
    --pr-gold-secondary: #f4d03f;
    --pr-navy: #0f172a;
    --pr-glass-bg: rgba(255, 255, 255, 0.05);
    --pr-glass-border: rgba(212, 175, 55, 0.3);
    --pr-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Floating Action Button - Premium Redesign */
.pr-gen-fab {
    position: fixed;
    bottom: 2rem;
    right: 6.5rem;
    /* Offset to the left of scroll-top button */
    width: 65px;
    height: 65px;
    border-radius: 20px;
    /* Squircle/Modern rounded square */
    background: rgba(212, 175, 55, 0.15);
    /* Glass base */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 15px rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1000;
    animation: prFloat 3s ease-in-out infinite, prPulse 2s infinite;
}

.pr-gen-fab:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(212, 175, 55, 0.25);
    border-color: #d4af37;
    box-shadow:
        0 12px 40px rgba(212, 175, 55, 0.3),
        inset 0 0 20px rgba(212, 175, 55, 0.3);
    color: #fff;
    animation: none;
    /* Stop float on hover for stability */
}

/* Label Tooltip */
.pr-gen-fab::after {
    content: "Developer Tools ✨";
    position: absolute;
    right: 80px;
    background: #1e293b;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.pr-gen-fab:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Animations */
@keyframes prFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes prPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Modal Overlay */
.pr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pr-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.pr-modal-container {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: var(--pr-navy);
    border: 1px solid var(--pr-glass-border);
    border-radius: 20px;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem;
    box-shadow: var(--pr-shadow);
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pr-modal-overlay.active .pr-modal-container {
    transform: translateY(0);
}

.pr-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pr-modal-close:hover {
    color: var(--pr-gold-primary);
}

/* Form Styles */
.pr-form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pr-form-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--pr-gold-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pr-form-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.pr-form-group {
    margin-bottom: 1.5rem;
}

.pr-form-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.pr-form-group textarea,
.pr-form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.pr-form-group textarea:focus,
.pr-form-group input:focus {
    outline: none;
    border-color: var(--pr-gold-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.pr-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.pr-submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    color: var(--pr-navy);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.pr-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.pr-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Preview Area */
.pr-preview-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.pr-preview-section.active {
    display: block;
}

.pr-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pr-preview-header h3 {
    color: var(--pr-gold-primary);
    font-size: 1.2rem;
}

.pr-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pr-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--pr-gold-primary);
}

.pr-preview-content {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Loading Spinner */
.pr-loader {
    display: none;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--pr-navy);
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading .pr-loader {
    display: block;
}

.loading .btn-text {
    display: none;
}

/* Embedded Mode (for DevTools Page) */
.pr-embedded-container {
    background: var(--pr-navy);
    border: 1px solid var(--pr-glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--pr-shadow);
    max-width: 900px;
    margin: 2rem auto;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.pr-embedded-container .pr-form-header {
    margin-bottom: 2.5rem;
}

.pr-embedded-container .pr-form-group label {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: #cbd5e1;
}

.pr-embedded-container input,
.pr-embedded-container textarea {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
}

.pr-embedded-container input:focus,
.pr-embedded-container textarea:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--pr-gold-primary);
}

/* ===== Smart PR Structure Controls ===== */

.pr-structure-controls {
    margin-bottom: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.pr-structure-controls:hover {
    border-color: rgba(212, 175, 55, 0.35);
}

/* Collapsible Header Button */
.pr-structure-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.4rem;
    background: rgba(212, 175, 55, 0.06);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
}

.pr-structure-toggle:hover {
    background: rgba(212, 175, 55, 0.12);
}

.pr-structure-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.pr-structure-toggle-left i {
    color: var(--pr-gold-primary);
    font-size: 1rem;
}

.pr-structure-toggle-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* ===========================
   AI Assist Controls
   =========================== */

/* Panel Container */
.ai-assist-panel {
    margin-bottom: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ai-assist-panel:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.06);
}

/* Toggle Header Button */
.ai-assist-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    border: none;
    cursor: pointer;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ai-assist-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.05));
}

.ai-assist-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.ai-assist-toggle-left i {
    color: var(--pr-gold-primary);
    font-size: 1.1rem;
}

.ai-assist-toggle-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pr-structure-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--pr-gold-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: all 0.3s ease;
}

.pr-structure-chevron {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-assist-badge {
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    color: var(--pr-navy);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ai-assist-chevron {
    color: #94a3b8;
    font-size: 0.8rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pr-structure-toggle[aria-expanded="true"] .pr-structure-chevron {
    transform: rotate(180deg);
}

/* Expandable Panel */
.pr-structure-panel {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.4rem;
}

.pr-structure-panel.open {
    max-height: 800px;
    opacity: 1;
    visibility: visible;
    padding: 0.8rem 1.4rem 1.4rem;
}

.pr-structure-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Toggle Options */
.pr-structure-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pr-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.pr-toggle-item:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateX(4px);
}

.pr-toggle-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.pr-toggle-info>i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--pr-gold-primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pr-toggle-label {
    display: block;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}

.pr-toggle-desc {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    margin-top: 0.15rem;
}

/* Toggle Switch */
.pr-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.pr-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.pr-toggle-slider {
    position: absolute;
    inset: 0;
    background: #334155;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.pr-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-assist-panel.open .ai-assist-chevron {
    transform: rotate(180deg);
}

/* Collapsible Body */
.ai-assist-body {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.4rem;
}

.ai-assist-panel.open .ai-assist-body {
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
    padding: 1.2rem 1.4rem 1.6rem;
}

/* Control Group */
.ai-control-group {
    margin-bottom: 1.6rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ai-control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.ai-control-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.ai-control-label i {
    color: var(--pr-gold-primary);
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
}

.ai-control-value {
    color: var(--pr-gold-primary);
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.ai-control-desc {
    color: #64748b;
    font-size: 0.78rem;
    margin: 0.6rem 0 0;
    line-height: 1.5;
}

/* Creativity Slider */
.ai-slider-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ai-slider-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 28px;
    text-align: center;
}

.ai-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #334155 0%, #334155 100%);
    outline: none;
    transition: background 0.3s ease;
    cursor: pointer;
}

.ai-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4), 0 0 0 3px rgba(212, 175, 55, 0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ai-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 16px rgba(212, 175, 55, 0.5), 0 0 0 5px rgba(212, 175, 55, 0.2);
}

.ai-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4), 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Strictness Toggle */
.ai-strictness-toggle {
    display: flex;
    gap: 0;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-strictness-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.ai-strictness-btn:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-strictness-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}

.ai-strictness-btn.active {
    color: var(--pr-navy);
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
}

.ai-strictness-btn.active i {
    color: var(--pr-navy);
}

/* Smart Toggle Cards */
.ai-smart-toggles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.ai-smart-toggle-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.ai-smart-toggle-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    background: rgba(15, 23, 42, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ai-smart-toggle-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
}

.ai-smart-toggle-top i {
    color: var(--pr-gold-primary);
    font-size: 0.9rem;
}

.ai-smart-toggle-desc {
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

/* Custom Toggle Switch */
.ai-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    align-self: flex-start;
    flex-shrink: 0;
}

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

.ai-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #334155;
    border-radius: 24px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #94a3b8;
    border-radius: 50%;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pr-toggle-switch input:checked+.pr-toggle-slider {
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.pr-toggle-switch input:checked+.pr-toggle-slider::before {
    transform: translateX(20px);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pr-toggle-switch input:focus+.pr-toggle-slider {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Disabled state for toggle items */
.pr-toggle-item.disabled {
    opacity: 0.5;
}

.pr-toggle-item.disabled .pr-toggle-info>i {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
}

/* Responsive */
@media (max-width: 600px) {
    .pr-structure-toggle {
        padding: 0.8rem 1rem;
    }

    .pr-structure-panel.open {
        padding: 0.6rem 1rem 1rem;
    }

    .pr-toggle-item {
        padding: 0.7rem 0.8rem;
    }

    .pr-toggle-info>i {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .pr-toggle-label {
        font-size: 0.82rem;
    }

    .pr-toggle-desc {
        font-size: 0.7rem;
    }

    .pr-structure-badge {
        font-size: 0.68rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ===== Editable PR Textarea with Settings ===== */

.pr-preview-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Word/Char Counter */
.pr-word-count {
    font-size: 0.72rem;
    color: #64748b;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}



/* Editor Hint */
.pr-editor-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
}

.pr-editor-hint i {
    color: var(--pr-gold-primary);
    font-size: 0.75rem;
}

/* Compact Formatting Strip */
.pr-format-strip {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0.45rem 0.6rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
}

.pr-fmt-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: all 0.2s ease;
}

.pr-fmt-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--pr-gold-primary);
    border-color: rgba(212, 175, 55, 0.15);
}

.pr-fmt-btn:active {
    transform: scale(0.9);
    background: rgba(212, 175, 55, 0.2);
}

.pr-fmt-sep {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 0.3rem;
    flex-shrink: 0;
}

/* When formatting strip is present, remove top border-radius of textarea */
.pr-format-strip+.pr-editable-textarea {
    border-radius: 0 0 12px 12px;
    border-top-color: rgba(255, 255, 255, 0.04);
}

.pr-editable-textarea {
    width: 100%;
    min-height: 250px;
    resize: vertical;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, font-size 0.2s ease;
}

.pr-editable-textarea:focus {
    border-color: var(--pr-gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.pr-editable-textarea::placeholder {
    color: #475569;
    font-style: italic;
}

.pr-editable-textarea::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #fff;
}


/* Copy button success state */
.pr-copy-btn.success {
    background: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
    color: #22c55e !important;
}

@media (max-width: 600px) {
    .pr-preview-actions {
        flex-wrap: wrap;
    }

    .pr-word-count {
        order: 10;
        width: 100%;
        text-align: center;
        margin-top: 0.3rem;
    }



    .pr-fmt-btn {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }

    .pr-format-strip {
        gap: 1px;
        padding: 0.35rem 0.4rem;
    }
}


.ai-switch input:checked+.ai-switch-slider {
    background: linear-gradient(135deg, var(--pr-gold-primary), var(--pr-gold-secondary));
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.ai-switch input:checked+.ai-switch-slider::before {
    transform: translateX(20px);
    background: var(--pr-navy);
}

/* Per-Field AI Assist */
.ai-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ai-field-header label {
    margin-bottom: 0 !important;
}

.ai-field-assist-btn {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--pr-gold-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.32rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ai-field-assist-btn:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--pr-gold-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.15);
}

.ai-field-assist-btn:active {
    transform: translateY(0);
}

.ai-field-assist-btn.improving {
    pointer-events: none;
    opacity: 0.7;
}

.ai-field-assist-btn.improving i {
    animation: spin 1s linear infinite;
}

.ai-field-assist-btn.success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

/* AI Field Group highlight on improve */
.ai-field-group {
    position: relative;
    transition: all 0.3s ease;
}

.ai-field-group.ai-improving {
    border-left: 3px solid var(--pr-gold-primary);
    padding-left: 0.8rem;
    border-radius: 4px;
}

.ai-field-group.ai-improving::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(212, 175, 55, 0.03);
    border-radius: 8px;
    pointer-events: none;
}

/* AI Status Toast */
.ai-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #e2e8f0;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.ai-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ai-toast i {
    color: var(--pr-gold-primary);
}

/* Responsive for Smart Toggles */
@media (max-width: 768px) {
    .ai-smart-toggles {
        grid-template-columns: 1fr;
    }

    .ai-assist-body {
        padding: 0 1rem;
    }

    .ai-assist-panel.open .ai-assist-body {
        padding: 1rem;
    }

    .ai-strictness-toggle {
        flex-direction: column;
    }

    .ai-strictness-btn:first-child {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

@media (max-width: 500px) {
    .ai-field-assist-btn span {
        display: none;
    }

    .ai-field-assist-btn {
        padding: 0.3rem 0.5rem;
    }
}
/* =========================================
   PR STATUS ANALYZER STYLES
========================================= */
.pr-status-panel {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.25);
    animation: fadeIn 0.3s ease;
}

.pr-status-header {
    font-weight: 600;
    color: #d4af37;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.pr-status-content {
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.pr-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 6px;
}

.pr-badge.open {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.pr-badge.merged {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.pr-badge.closed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.pr-badge.draft {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5f5;
}