/* Management Modal Styles */
#tags-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 320px;
    max-width: 90vw;
}

#new-session-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 320px;
    max-width: 90vw;
}

#new-session-name-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.modal-primary-btn {
    padding: 0.6rem 0.8rem;
    background-color: var(--primary-color);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
.modal-primary-btn:hover { filter: brightness(1.1); }
.modal-primary-btn:active { transform: scale(0.98); }

.modal-secondary-btn {
    padding: 0.6rem 0.8rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}
.modal-secondary-btn:hover { background: var(--hover-bg); }
.modal-secondary-btn:active { transform: scale(0.98); }

.secondary-button {
    background-color: var(--surface-muted);
    color: var(--text-muted-dark);
}
body.dark-mode .secondary-button {
    background-color: var(--surface-muted-dark);
}

#modal-tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.modal-tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
}

.delete-tag-btn {
    background: none;
    border: none;
    color: var(--recording-red);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 4px;
}

.tag-reorder-btns {
    display: flex;
    flex-direction: row;
    gap: 2px;
}

.reorder-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 6px 8px;
    min-width: 24px;
    min-height: 24px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.reorder-btn:hover:not(:disabled) {
    opacity: 1;
}

.reorder-btn:disabled {
    opacity: 0.2;
    cursor: default;
}

.modal-input-row {
    display: flex;
    gap: 0.5rem;
}

#new-tag-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9rem;
}

#add-tag-btn {
    padding: 0.5rem 1rem;
}

/* Guest Mode Restrictions */
body.guest-mode #quick-tags-bar { display: none !important; }

/* Share Link Modal */
#share-link-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 280px;
    max-width: 90vw;
}

#share-link-message {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    margin: 0.5rem 0;
    color: var(--primary-color);
    background-color: var(--primary-alpha-10);
    min-height: 1.2em;
}

#timer-warning-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 280px;
    max-width: 90vw;
}

#share-link-url {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 0.75rem;
    font-family: var(--font-mono);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
}

#share-link-url:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Connection Lost Modal */
#connection-lost-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 280px;
    max-width: 90vw;
}

/* Timezone Modal */
#timezone-modal {
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
    width: 280px;
    max-width: 90vw;
}

.timezone-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.timezone-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.2s;
}

.timezone-option:hover {
    background: var(--hover-bg);
}

.timezone-option input[type="radio"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.timezone-label {
    font-size: 0.9rem;
    color: var(--text-color);
}
