/* ── Secure Paste page styles ───────────────────────────────── */

.paste-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

/* ── Hero ───────────────────────────────────────────────────── */
.paste-hero {
    text-align: center;
    margin-bottom: 2rem;
}
.paste-hero h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}
.paste-hero h1 svg {
    width: 1.8rem;
    height: 1.8rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.paste-hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 540px;
    margin: 0 auto;
}

/* ── Info banner ────────────────────────────────────────────── */
.info-banner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: var(--bg-secondary);
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-left: 3px solid rgba(100, 180, 255, 0.6);
    border-radius: 0.6rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.info-banner svg {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: rgba(100, 180, 255, 0.8);
}
.info-banner strong {
    color: var(--text-primary);
}

/* ── Section cards ──────────────────────────────────────────── */
.paste-section {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.paste-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.paste-section h2 svg {
    width: 1rem;
    height: 1rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ── Paste editor textarea ──────────────────────────────────── */
.paste-editor {
    width: 100%;
    min-height: 220px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Fira Mono', 'Consolas', 'Source Code Pro', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
    outline: none;
}
.paste-editor:focus {
    border-color: var(--accent-primary);
}
.paste-editor::placeholder {
    color: var(--text-tertiary);
}

.char-count {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 0.4rem;
}

/* ── Options grid ───────────────────────────────────────────── */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.option-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.option-group select,
.option-group input[type="password"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-primary);
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.option-group select:focus,
.option-group input[type="password"]:focus {
    border-color: var(--accent-primary);
}

/* ── Password toggle ────────────────────────────────────────── */
.password-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.toggle-switch {
    width: 40px;
    height: 22px;
    background: var(--bg-tertiary, #333);
    border-radius: 11px;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.2s;
}
.toggle-switch.active {
    background: var(--accent-primary);
}
.toggle-switch.active::after {
    transform: translateX(18px);
}

.password-input-wrapper {
    display: none;
    margin-top: 0.5rem;
}
.password-input-wrapper.visible {
    display: block;
}
.password-input-wrapper input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-primary);
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.password-input-wrapper input:focus {
    border-color: var(--accent-primary);
}

/* ── Encryption badge ───────────────────────────────────────── */
.encryption-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 2rem;
    background: rgba(250, 56, 0, 0.1);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 600;
}
.encryption-badge svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* ── Action buttons ─────────────────────────────────────────── */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.action-buttons .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, var(--btn-orange-top, #fa3800), var(--btn-orange-bottom, #b72700));
    color: #fff;
    border: none;
    border-radius: var(--btn-orange-radius, 0.45rem);
    font-family: 'Play', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}
.action-buttons .btn-primary svg {
    width: 1rem;
    height: 1rem;
}
.action-buttons .btn-primary:hover {
    opacity: 0.9;
}
.action-buttons .btn-primary:active {
    transform: scale(0.98);
}
.action-buttons .btn-secondary {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.45rem;
    color: var(--text-secondary);
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.action-buttons .btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* ── Result section ─────────────────────────────────────────── */
.result-section {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(250, 106, 42, 0.2);
    display: none;
}
.result-section.visible {
    display: block;
}
.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.result-header svg {
    width: 1.75rem;
    height: 1.75rem;
    color: #22c55e;
    flex-shrink: 0;
}
.result-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.result-link-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.result-link-input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.45rem;
    color: var(--text-primary);
    font-family: monospace;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.45rem;
    color: var(--text-secondary);
    font-family: 'Play', sans-serif;
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-copy svg {
    width: 0.9rem;
    height: 0.9rem;
}
.btn-copy:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ── Share buttons ──────────────────────────────────────────── */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    padding: 0;
}
.share-btn svg {
    width: 1rem;
    height: 1rem;
}
.share-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ── Result info ────────────────────────────────────────────── */
.result-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.result-info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.result-info-item svg {
    width: 0.9rem;
    height: 0.9rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ── View paste section ─────────────────────────────────────── */
.view-paste-section {
    display: none;
}
.view-paste-section.visible {
    display: block;
}

.password-prompt {
    text-align: center;
    padding: 2.5rem 1.5rem;
}
.password-prompt h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.4rem 0;
}
.password-prompt p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}
.password-prompt-input {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.password-prompt-input input {
    flex: 1;
    max-width: 320px;
    min-width: 0;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.45rem;
    color: var(--text-primary);
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.password-prompt-input input:focus {
    border-color: var(--accent-primary);
}

/* ── Paste meta (view mode) ─────────────────────────────────── */
.paste-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.paste-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.paste-meta-item svg {
    width: 0.85rem;
    height: 0.85rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ── Paste content display (pre block) ──────────────────────── */
.paste-content-display {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'Fira Mono', 'Consolas', 'Source Code Pro', monospace;
    font-size: 0.88rem;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
    margin: 0;
}

/* ── Generic btn-secondary inside paste page ────────────────── */
.paste-section .btn-secondary,
.result-section .btn-secondary {
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.45rem;
    color: var(--text-secondary);
    font-family: 'Play', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.paste-section .btn-secondary:hover,
.result-section .btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* ── Generic btn-primary inside paste page ──────────────────── */
.paste-section .btn-primary,
.result-section .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    background: linear-gradient(180deg, var(--btn-orange-top, #fa3800), var(--btn-orange-bottom, #b72700));
    color: #fff;
    border: none;
    border-radius: var(--btn-orange-radius, 0.45rem);
    font-family: 'Play', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.paste-section .btn-primary:hover,
.result-section .btn-primary:hover {
    opacity: 0.9;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .paste-container {
        padding: 1.25rem 1rem 2.5rem;
    }
    .paste-hero h1 {
        font-size: 1.5rem;
    }
    .options-grid {
        grid-template-columns: 1fr;
    }
    .result-link-box {
        flex-direction: column;
    }
    .result-link-input {
        width: 100%;
    }
}
