/**
 * Account Switcher Styles
 * Google-style account switcher UI
 */

/* ============================================
 * Account List Container
 * ============================================ */
.saved-accounts-section {
    margin-bottom: 20px;
}

.saved-accounts-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

/* ============================================
 * Account Item
 * ============================================ */
.account-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    position: relative;
}

.account-item:hover {
    background-color: #f8f8f8;
    border-color: #c60033;
    box-shadow: 0 2px 8px rgba(198, 0, 51, 0.1);
}

.account-item.active {
    background-color: #fff5f7;
    border-color: #c60033;
}

.account-item:last-child {
    margin-bottom: 0;
}

/* ============================================
 * Avatar Circle
 * ============================================ */
.account-avatar {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c60033 0%, #8b0023 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-right: 12px;
    text-transform: uppercase;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ============================================
 * Account Info
 * ============================================ */
.account-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.account-username {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-name {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.account-shop {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.account-last-login {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
}

/* ============================================
 * Status Badge
 * ============================================ */
.account-status {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    margin-left: 10px;
    white-space: nowrap;
}

.account-status.active {
    background-color: #28a745;
    color: white;
}

.account-status.signed-out {
    background-color: #6c757d;
    color: white;
}

/* ============================================
 * Delete Button
 * ============================================ */
.btn-remove-account {
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: 10px;
    padding: 5px 8px;
}

.account-item:hover .btn-remove-account {
    opacity: 1;
}

/* ============================================
 * Divider
 * ============================================ */
.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    color: #999;
    margin: 20px 0;
    font-size: 13px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider-text::before {
    margin-right: 15px;
}

.divider-text::after {
    margin-left: 15px;
}

/* ============================================
 * Add Account Button
 * ============================================ */
.btn-add-account {
    width: 100%;
    padding: 12px 15px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: none;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-account:hover {
    border-color: #c60033;
    color: #c60033;
    background-color: #fff5f7;
}

.btn-add-account i {
    margin-right: 8px;
}

/* ============================================
 * Back to Accounts Link
 * ============================================ */
.btn-back-accounts {
    display: block;
    text-align: center;
    color: #c60033;
    font-size: 13px;
    margin-top: 15px;
    cursor: pointer;
    text-decoration: none;
}

.btn-back-accounts:hover {
    text-decoration: underline;
    color: #8b0023;
}

/* ============================================
 * Account Switcher Modal
 * ============================================ */
#account-switcher-modal .modal-dialog {
    max-width: 380px;
}

#account-switcher-modal .modal-header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 15px;
}

#account-switcher-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#account-switcher-modal .modal-title i {
    margin-right: 8px;
}

#account-switcher-modal .modal-body {
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
}

#account-switcher-modal .modal-footer {
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
}

/* ============================================
 * Login Page Specific Styles
 * ============================================ */
.login100-form.saved-accounts-section {
    padding: 55px 55px 35px 55px;
}

.login100-form.saved-accounts-section .account-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
}

.login100-form.saved-accounts-section .account-item:hover {
    background-color: #f8f8f8;
    border-color: #c60033;
}

.login100-form.saved-accounts-section .account-item.active {
    background-color: #fff5f7;
    border-color: #c60033;
}

.login100-form.saved-accounts-section .divider-text {
    color: #888;
    font-size: 13px;
}

.login100-form.saved-accounts-section .divider-text::before,
.login100-form.saved-accounts-section .divider-text::after {
    border-color: #ddd;
}

.login100-form.saved-accounts-section .btn-add-account {
    background-color: #fff;
    border: 2px dashed #ccc;
    padding: 15px;
    font-size: 14px;
}

.login100-form.saved-accounts-section .btn-add-account:hover {
    background-color: #fff5f7;
    border-color: #c60033;
    color: #c60033;
}

/* Account item in login page */
.login100-form.saved-accounts-section .account-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    font-size: 20px;
}

.login100-form.saved-accounts-section .account-username {
    font-size: 15px;
}

.login100-form.saved-accounts-section .account-name {
    font-size: 13px;
}

.login100-form.saved-accounts-section .account-shop {
    font-size: 12px;
}

@media (max-width: 576px) {
    .login100-form.saved-accounts-section {
        padding: 30px 25px 25px 25px;
    }
}

/* ============================================
 * Responsive
 * ============================================ */
@media (max-width: 576px) {
    .account-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
    }

    .account-username {
        font-size: 13px;
    }

    .account-name {
        font-size: 12px;
    }

    .account-status {
        font-size: 10px;
        padding: 3px 8px;
    }

    #account-switcher-modal .modal-dialog {
        max-width: 100%;
        margin: 10px;
    }
}

/* ============================================
 * Animation
 * ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-item {
    animation: fadeIn 0.3s ease;
}

.account-item:nth-child(1) { animation-delay: 0s; }
.account-item:nth-child(2) { animation-delay: 0.05s; }
.account-item:nth-child(3) { animation-delay: 0.1s; }
.account-item:nth-child(4) { animation-delay: 0.15s; }
.account-item:nth-child(5) { animation-delay: 0.2s; }
