.pane-button {
    padding: 8px 16px;
    border-radius: 4px;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-buttons-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    width: max-content;
    order: 2; /* Ensure buttons come second */
}


/* Edit button styles */
.zoom-button,
.edit-pane-button {
    z-index: 9999;
    background-color: var(--neutral-dark);
    color: var(--bg-light);
    border: 1px solid var(--neutral-dark);
    box-shadow: 0 1px 2px var(--neutral);
}

.zoom-button,
.pin-all-arguments-button,
.unpin-all-arguments-button {
    width: 90px; /* Wider to accommodate text */
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    font-family: var(--font-family-main), serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Edit button styles */
.add-argument-pane-button {
    z-index: 9999;
    background-color: var(--neutral-dark);
    color: var(--bg-light);
    border: 1px solid var(--neutral-dark);
    box-shadow: 0 1px 2px var(--neutral);
}

.add-argument-pane-button:hover {
    background-color: var(--neutral);
    box-shadow: 0 2px 4px var(--neutral);
}

/* Save button styles */
.save-pane-button {
    z-index: 9999;
}

.add-element-button {
    padding: 8px 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    background-color: var(--bg-light);
    color: var(--neutral-dark);
    border: 1px dashed var(--neutral-dark);
    border-radius: 6px;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.add-element-button:hover {
    background-color: var(--bg-medium);
    border-style: solid;
}

.add-element-button svg {
    width: 16px;
    height: 16px;
}

.remove-button {
    padding: 6px;
    border: none;
    cursor: pointer;
    color: var(--neutral-light);
    background-color: var(--critical-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
}

.remove-button:hover {
    background-color: var(--critical-dark);
}

.remove-button svg {
    width: 14px;
    height: 14px;
}

/* Section headers styling */
.section-label {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: var(--standard-title-text);
    padding: 12px 16px;
    border-bottom: 2px solid var(--neutral-dark);
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 16px 0;
    gap: 8px;
}

.sub-section-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--standard-h2-text);
    padding: 12px 16px;
    background-color: var(--neutral-light);;
    border-bottom: 1px solid var(--neutral-dark);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.author-control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.authors-section,
.source-fields-section {
    margin-bottom: 24px;
}

.move-up-button,
.move-down-button {
    padding: 6px;
    border: 1px solid var(--neutral-light);
    border-radius: 4px;
    background-color: var(--neutral-dark);
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.move-up-button:hover,
.move-down-button:hover {
    background-color: var(--neutral);
}

.move-up-button:active,
.move-down-button:active {
    transform: translateY(1px);
}

.move-up-button svg,
.move-down-button svg {
    width: 14px;
    height: 14px;
}

.move-buttons {
    display: flex;
    gap: 4px;
}

.copy-button {
    padding: 6px;
    background: none;
    border: 1px solid var(--neutral-light);
    color: var(--neutral-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
}

.button-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0; /* Prevents buttons from shrinking */
    align-self: flex-start; /* Aligns to top */
}

.trimmed-argument-content {
    flex: 1; /* Takes up remaining space */
    font-size: 14px;
    line-height: 1.4;
    color: var(--standard-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.button-stack .copy-button {
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 1;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.button-stack .remove-button {
    padding: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    position: static;
}

.copy-button:hover {
    background-color: var(--bg-medium);
    border-color: var(--neutral);
}

.copy-button svg {
    width: 12px;
    height: 12px;
}

.argument-framework-pane-main-controls {
    display: flex;
    position: fixed;
    flex-direction: row; /* Changed from column to row */
    align-items: flex-start; /* Changed from center to flex-start */
    gap: 32px; /* Increased gap to prevent overlap */
    z-index: 9999;
    top: 120px;
    right: 20px;
}

.add-arguments-section {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.add-arguments-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.add-arguments-buttons {
    display: flex;
    gap: 10px;
}


.delete-button-container {
    width: 100%;
    max-width: 540px; /* Match edit-argument-properties max-width */
    margin: 0 auto 16px; /* Center and add bottom margin */
    padding: 0;
}

.delete-button {
    width: 100%;
    background-color: var(--critical-light);
    color: var(--standard-text);
    border: none;
    padding: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Lexend Deca", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.delete-button:hover {
    background-color: var(--critical-medium);
}

.delete-button svg {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.dialog-cancel {
    background-color: var(--neutral-dark);
    color: var(--bg-light);
    border: 1px solid var(--neutral-dark);
    box-shadow: 0 1px 2px var(--neutral);
}

.dialog-cancel:hover {
    background-color: var(--neutral);
    box-shadow: 0 2px 4px var(--neutral);
}

.dialog-confirm,
.save-pane-button {
    background-color: var(--affirmative-neutral);
    border: var(--affirmative-neutral);
    color: var(--affirmative-light);
}

.dialog-confirm:hover,
.save-pane-button:hover {
    background-color: var(--affirmative-light);
    color: var(--affirmative-neutral);
    box-shadow: 0 1px 2px var(--affirmative-light);
}

.save-pane-button.disabled {
    background-color: var(--neutral);
    border: 1px solid var(--neutral);
    color: var(--neutral-dark);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Updated zoom controls styling */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    align-items: flex-end; /* Align items to the right */
}

/* Zoom level specific styles */
.zoom-level {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    text-align: center;
    font-family: "Lexend Deca", sans-serif;
    margin: 0; /* Remove margin to keep consistent spacing */
}

.zoom-button {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: var(--neutral-dark);
    color: var(--bg-light);
    border: 1px solid var(--neutral-dark);
    box-shadow: 0 1px 2px var(--neutral);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Hover effects */
.zoom-button:hover,
.edit-pane-button:hover,
.pin-all-arguments-button:hover,
.unpin-all-arguments-button:hover {
    background-color: var(--neutral);
    box-shadow: 0 2px 4px var(--neutral);
}

/* Active state for buttons */
.zoom-button:active,
.pin-all-arguments-button:active,
.unpin-all-arguments-button:active {
    transform: translateY(1px);
}

.add-tag-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: var(--bg-light);
    color: var(--standard-lighter-text);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 120px; /* Minimum width */
    flex-shrink: 0; /* Prevent button from shrinking */
    white-space: nowrap; /* Prevent text wrapping inside button */
}

.add-tag-button:hover {
    background-color: var(--bg-medium);
}

.add-tag-button svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.remove-tag-button,
.remove-tag-value-button {
    padding: 2px;
    border: none;
    background: none;
    color: var(--critical-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-tag-button:hover,
.remove-tag-value-button:hover {
    color: var(--critical-dark);
    background-color: var(--critical-light);
}

.remove-tag-button svg,
.remove-tag-value-button svg {
    width: 14px;
    height: 14px;
}

.add-to-category-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--bg-light);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.add-to-category-button:hover {
    background-color: var(--bg-medium);
}

.add-to-category-button svg {
    width: 14px;
    height: 14px;
}

.feedback-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    padding: 10px 20px;
    background-color: var(--accent);
    color: var(--standard-h2-text);;
    border: none;
    border-radius: 8px;
    font-family: var(--font-family-main);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    animation: pulse 2s infinite;
}

.feedback-button:hover {
    background-color: var(--accent-light);
    animation: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.feedback-button svg {
    width: 16px;
    height: 16px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(44, 82, 130, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 82, 130, 0);
    }
}

.toggle-switch {
    position: relative;
    margin-left: auto; /* This pushes the toggle to the right */
    display: inline-flex;
    align-items: center;
    width: 80px;
    height: 34px;
    background-color: var(--critical-medium);
    border-radius: 34px;
    padding: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch.active {
    background-color: var(--affirmative-neutral);
}

.toggle-slider {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--bg-light);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px var(--neutral-dark);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(46px);
}

.toggle-label {
    position: absolute;
    right: 10px; /* Position on the right when inactive */
    color: var(--neutral-light);
    font-weight: bold;
    user-select: none;
    transition: right 0.3s, left 0.3s, color 0.3s;
}


/* Override text color for active state */
.toggle-switch.active .toggle-label {
    left: 10px; /* Position on the left when active */
    right: auto; /* Remove right positioning */
}

.profile-button {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-family-main);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.profile-button:hover {
    background-color: rgb(255 255 255 / 10%);
}

.profile-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--primary-dark);
    min-width: 180px;
    box-shadow: 0 8px 16px rgb(0 0 0 / 20%);
    border-radius: 4px;
    z-index: 1001;
    margin-top: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    transition: visibility 0.2s, opacity 0.2s;
    visibility: hidden;
    opacity: 0;
}

.profile-dropdown-content::before {
    content: "";
    position: absolute;
    top: -20px;
    right: 0;
    width: 100%;
    height: 20px;
}

.profile-dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.profile-dropdown-content a:hover {
    background-color: rgb(255 255 255 / 10%);
    cursor: pointer;
}

.profile-dropdown:hover .profile-dropdown-content,
.profile-dropdown-content:hover {
    display: block;
    visibility: visible;
    opacity: 1;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    cursor: help;
    color: var(--neutral);
    transition: color 0.2s ease;
}

.info-tooltip:hover {
    color: var(--primary);
}

.info-tooltip svg {
    width: 16px;
    height: 16px;
}

/* Tooltip content positioned to the right */
.info-tooltip::before {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px); /* Position to the right with 12px gap */
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--neutral-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    line-height: 1.3;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Arrow pointing left (towards the icon) */
.info-tooltip::after {
    content: '';
    position: absolute;
    left: calc(100% + 6px); /* Position arrow between icon and tooltip */
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--neutral-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.info-tooltip:hover::before,
.info-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}