/* Side Actions (Floating Buttons) */
.side-actions {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
    padding-right: 12px;
}

.side-button {
    background: var(--card);
    border: 1px solid var(--stroke);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 12px 0 0 12px;
    /* Rounded left corners only */
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-right: none;
    margin-right: -12px;
    /* Pull partially off-screen if desired, or keep visible */
    padding-right: 20px;
}

.side-button:hover {
    transform: translateX(-5px);
    background: var(--bg-secondary);
}

.side-button .icon {
    font-size: 1.2rem;
}

.side-button .label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Side Drawer */
.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    /* Adjust width as needed */
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--stroke);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 200;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 60px 20px 20px;
    /* Top padding for close button space */
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.side-drawer[aria-hidden="false"] {
    transform: translateX(0);
}

.drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.drawer-close:hover {
    color: var(--accent);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.drawer-content.hidden {
    display: none;
    opacity: 0;
}

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-backdrop[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* Ensure cards inside drawer look good */
.side-drawer .card {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

@media (max-width: 480px) {
    .side-drawer {
        width: 100%;
        max-width: 100%;
    }
}

/* Form Footer & Text Button */
.form-footer {
    margin-top: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.text-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

.text-button:hover {
    color: #fff;
}