/**
 * Multi-Account System Styles
 * Client-side storage multi-account interface
 */

/* Multi-Account Dropdown */
#multiAccountDropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#multiAccountDropdown:not(.hidden) {
    max-height: 600px;
    overflow-y: auto;
}

/* Multi-Account List */
.multi-account-list {
    background: inherit;
}

.multi-account-section {
    padding: 0.75rem 0;
}

.multi-account-section:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.multi-account-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.multi-account-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

/* Account Item */
.multi-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 0.75rem;
}

.multi-account-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.multi-account-item.active {
    background-color: rgba(59, 130, 246, 0.15);
    cursor: default;
}

.multi-account-item.active:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.account-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.account-details {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    background-color: rgb(34, 197, 94);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.account-email {
    font-size: 0.75rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.125rem;
}

.account-badges {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.account-badge {
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-admin {
    background-color: rgba(239, 68, 68, 0.2);
    color: rgb(248, 113, 113);
}

.badge-dj {
    background-color: rgba(168, 85, 247, 0.2);
    color: rgb(192, 132, 252);
}

/* Account Actions */
.account-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.multi-account-item:hover .account-actions {
    opacity: 1;
}

.multi-account-item.active .account-actions {
    opacity: 1;
}

.account-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.account-action-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.account-action-icon:hover:last-child {
    background-color: rgba(239, 68, 68, 0.2);
    color: rgb(248, 113, 113);
}

/* Footer Actions */
.multi-account-footer {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.multi-account-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.multi-account-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.multi-account-action-btn.text-red-400 {
    color: rgb(248, 113, 113);
}

.multi-account-action-btn.text-red-400:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Manage Modal */
.multi-account-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.multi-account-modal.active {
    opacity: 1;
}

.multi-account-modal-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.multi-account-modal-content {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background: linear-gradient(to bottom right, rgb(17, 24, 39), rgb(31, 41, 55));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.multi-account-modal.active .multi-account-modal-content {
    transform: scale(1);
}

.multi-account-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.multi-account-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.modal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.multi-account-modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Manage Stats */
.manage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(59, 130, 246);
}

.stat-label {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Manage Actions */
.manage-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.manage-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(96, 165, 250);
    cursor: pointer;
    transition: all 0.2s;
}

.manage-action-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.manage-action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: rgb(248, 113, 113);
}

.manage-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Scrollbar */
.multi-account-modal-body::-webkit-scrollbar,
#multiAccountDropdown::-webkit-scrollbar {
    width: 8px;
}

.multi-account-modal-body::-webkit-scrollbar-track,
#multiAccountDropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.multi-account-modal-body::-webkit-scrollbar-thumb,
#multiAccountDropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.multi-account-modal-body::-webkit-scrollbar-thumb:hover,
#multiAccountDropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .multi-account-modal-content {
        max-width: calc(100% - 2rem);
    }

    .account-badges {
        flex-wrap: wrap;
    }

    .multi-account-item {
        padding: 0.625rem 0.75rem;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.multi-account-item {
    animation: slideIn 0.2s ease-out;
}

.multi-account-item:nth-child(2) {
    animation-delay: 0.05s;
}

.multi-account-item:nth-child(3) {
    animation-delay: 0.1s;
}

.multi-account-item:nth-child(4) {
    animation-delay: 0.15s;
}

.multi-account-item:nth-child(5) {
    animation-delay: 0.2s;
}

/* Login Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-input {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.error-message {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 0.5rem;
    color: rgb(248, 113, 113);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgb(59, 130, 246), rgb(37, 99, 235));
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
