/* Styles for Hub and Lib Modals */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.hub-modal,
.lib-modal {
    max-width: 480px;
}

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-docs);
    /* margin-top: -10px; */
    margin-bottom: 10px;
}

.modal-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
}

.task-modal-content {
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.task-modal-comments {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.task-modal-comments .comment-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 400px;
}

.task-modal-comments .comment-modal-input {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-docs);
}

.task-modal-comments .comment-modal-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.hub-preview,
.lib-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 16px;
}

.hub-preview-icon,
.lib-preview-icon {
    font-size: 1.25rem;
}

.hub-preview-name,
.lib-preview-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Delete lib modal */
.delete-lib-modal {
    max-width: 480px;
}

.warning-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.warning-text strong {
    color: var(--accent);
}

.action-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.danger-text {
    color: #f87171;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    font-size: 0.9rem;
    margin-left: 26px;
    max-width: calc(100% - 26px);
}

/* Modal Specifics from app.css */
.modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    color: var(--text-primary);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-docs);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.footer-right {
    display: flex;
    gap: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-docs);
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}