/* ── NearDrop — tool-specific styles ── */

/* Host section */
.ndrop-host-section {
    text-align: center;
    padding: 1.5rem 0;
}

.ndrop-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Room code display */
.ndrop-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ndrop-code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    color: var(--text-primary, #111827);
    background: var(--surface-alt, #f3f4f6);
    padding: 0.5rem 1.25rem;
    border-radius: 0.75rem;
    min-width: 220px;
    text-align: center;
    user-select: all;
    transition: background 0.2s ease;
}

[data-theme="dark"] .ndrop-code,
.dark .ndrop-code {
    background: var(--surface-alt, #1f2937);
    color: var(--text-primary, #f9fafb);
}

/* Divider */
.ndrop-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ndrop-divider::before,
.ndrop-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e5e7eb);
}

.ndrop-divider span {
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    font-weight: 500;
    text-transform: uppercase;
}

/* Join section */
.ndrop-join-section {
    text-align: center;
    padding: 1rem 0;
}

.ndrop-join-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 340px;
    margin: 0 auto;
}

.ndrop-code-input {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-align: center;
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color, #d1d5db);
    border-radius: 0.75rem;
    background: var(--surface, #fff);
    color: var(--text-primary, #111827);
    width: 180px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ndrop-code-input:focus {
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .ndrop-code-input,
.dark .ndrop-code-input {
    background: var(--surface, #111827);
    color: var(--text-primary, #f9fafb);
    border-color: var(--border-color, #374151);
}

/* Privacy note */
.ndrop-privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface-alt, #f0fdf4);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #15803d);
}

[data-theme="dark"] .ndrop-privacy-note,
.dark .ndrop-privacy-note {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
}

/* Connection status */
.ndrop-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background: var(--surface-alt, #f0fdf4);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #15803d);
}

[data-theme="dark"] .ndrop-status,
.dark .ndrop-status {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
}

.ndrop-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    animation: ndrop-pulse 2s ease-in-out infinite;
}

@keyframes ndrop-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* File lists */
.ndrop-file-list,
.ndrop-received-list {
    margin: 1rem 0;
}

.ndrop-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface-alt, #f9fafb);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}

[data-theme="dark"] .ndrop-file-item,
.dark .ndrop-file-item {
    background: var(--surface-alt, #1f2937);
}

.ndrop-file-item-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary, #111827);
}

[data-theme="dark"] .ndrop-file-item-name,
.dark .ndrop-file-item-name {
    color: var(--text-primary, #f9fafb);
}

.ndrop-file-item-size {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
    white-space: nowrap;
}

.ndrop-file-item-progress {
    width: 100px;
    height: 6px;
    background: var(--border-color, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}

.ndrop-file-item-progress-fill {
    height: 100%;
    background: var(--primary, #6366f1);
    border-radius: 3px;
    transition: width 0.15s ease;
}

.ndrop-file-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ndrop-file-item-status.complete {
    color: #22c55e;
}

.ndrop-file-item-status.sending {
    color: var(--primary, #6366f1);
}

/* Received files title */
.ndrop-received-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--text-primary, #111827);
}

[data-theme="dark"] .ndrop-received-title,
.dark .ndrop-received-title {
    color: var(--text-primary, #f9fafb);
}

/* Copied toast */
.ndrop-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #22c55e;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

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

/* RTL support */
[dir="rtl"] .ndrop-code {
    letter-spacing: 0.25em;
    direction: ltr;
    unicode-bidi: bidi-override;
}

[dir="rtl"] .ndrop-code-input {
    direction: ltr;
    unicode-bidi: bidi-override;
}

[dir="rtl"] .ndrop-join-row {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 640px) {
    .ndrop-code {
        font-size: 1.75rem;
        min-width: 160px;
        padding: 0.375rem 1rem;
    }

    .ndrop-code-input {
        font-size: 1.25rem;
        width: 140px;
    }

    .ndrop-join-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    [dir="rtl"] .ndrop-join-row {
        flex-direction: column;
    }

    .ndrop-code-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ndrop-file-item {
        flex-wrap: wrap;
    }

    .ndrop-file-item-progress {
        width: 100%;
        order: 10;
    }
}
