/* app/static/app/css/base.css */
/* Core base template styles */

/* Workspace dropdown */
.ws-dropdown {
    position: relative;
    display: inline-block;
}

.ws-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.ws-dropdown-content a,
.ws-dropdown-content button {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
}

.ws-dropdown-content a:hover,
.ws-dropdown-content button:hover {
    background-color: #f1f1f1;
}

.ws-dropdown:hover .ws-dropdown-content {
    display: block;
}

.ws-header,
.ws-item {
    border-bottom: 1px solid #e5e5e5;
}

.ws-header {
    padding: 12px 16px;
}

.ws-header strong {
    display: block;
    font-size: 0.8em;
    color: #666;
}

.ws-item.active {
    font-weight: bold;
    color: var(--primary-color);
}

.ws-item .fa-check {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.ws-item.active .fa-check {
    opacity: 1;
}

.header-action-btn {
    position: relative;
    background: none;
    border: 1px solid var(--grey-300);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--grey-700);
    transition: background-color 0.2s ease;
}

.header-action-btn:hover {
    background-color: var(--grey-100);
}

.task-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: bold;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

/* Impersonation banner adjustments */
.impersonating-adjustments #header,
.impersonating-adjustments #navigation {
    top: 40px !important;
}

.impersonating-adjustments #main {
    margin-top: calc(var(--header-height) + 40px) !important;
}

/* Navigation badges */
.nav-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7em;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    min-width: 18px;
    text-align: center;
}

.nav-badge-main {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
}

/* Workspace dropdown separators */
.ws-separator { border-top: 1px solid #e5e5e5; }
.ws-separator--admin { border-top: 1px solid #e5e5e5; color: var(--primary-color-dark); font-weight: bold; }

/* Activity indicator in header */
.activity-spinner {
    color: var(--primary-color, #2563eb);
    margin-right: 15px;
}

/* Create workspace modal */
.create-ws-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.create-ws-modal-card { width: 500px; max-width: 90%; }
.create-ws-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}
.create-ws-form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.create-ws-form-submit { width: 100%; margin-top: 10px; }
.create-ws-error { display: none; color: red; margin-top: 10px; }

/* Dropdown spacing */
.ws-dropdown-ml { margin-left: 15px; }

/* Impersonation banner */
.impersonation-banner {
    background-color: #ffc107;
    color: #333;
    text-align: center;
    padding: 10px;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.impersonation-form { display: inline; }
.impersonation-logout-btn {
    background: none;
    border: none;
    text-decoration: underline;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    padding: 0;
}
