/* ════════════════════════════════════════════════
   Share Notes Modal & Shared Notes Page
   ════════════════════════════════════════════════ */

/* ── Share Button in Notes Card ── */
.notes-share-btn {
    background: rgba(139, 92, 246, 0.12) !important;
    color: var(--accent-light) !important;
}
.notes-share-btn:hover {
    background: rgba(139, 92, 246, 0.25) !important;
}

/* ── Modal Overlay ── */
.share-notes-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease;
}

/* ── Modal ── */
.share-notes-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.share-notes-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.share-notes-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.share-notes-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 12px;
}

.share-notes-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.share-notes-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
}

/* ── Config Section ── */
.share-notes-config {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-notes-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 14px;
    color: var(--text-primary);
}

.share-notes-check:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.04);
}

.share-notes-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.share-notes-check input:disabled + span {
    opacity: 0.4;
}

.share-notes-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Generate Button ── */
.share-notes-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.4);
}

.share-notes-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.55);
}

.share-notes-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── Result Section ── */
.share-notes-result {
    animation: fadeInUp 0.3s ease;
}

.share-notes-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 16px;
}

.share-notes-link-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.share-notes-link {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--accent-light);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
    cursor: text;
}

.share-notes-link:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.share-notes-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-md);
    color: var(--accent-light);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.share-notes-copy-btn:hover {
    background: rgba(139, 92, 246, 0.2);
}

.share-notes-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

.share-notes-new-btn {
    background: none;
    border: none;
    color: var(--accent-light);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    padding: 8px 16px;
}

.share-notes-new-btn:hover {
    text-decoration: underline;
}

/* ── Error ── */
.share-notes-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 13px;
    color: #f87171;
    margin-top: 12px;
    text-align: center;
}

/* ── Animations ── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
