/* Saved Accounts - Facebook Style */

.saved-accounts-container {
    margin-bottom: 30px;
    width: 100%;
}

.saved-accounts-title {
    font-size: 16px;
    font-weight: 500;
    color: #1c1e21;
    margin-bottom: 20px;
    text-align: center;
}

.saved-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Individual Account Card */
.saved-account-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px 16px;
    background: #ffffff;
    border: 1px solid #dddfe2;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-height: 180px;
}

.saved-account-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #1877f2;
}

/* Remove Account Button */
.remove-account-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f2f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 18px;
    color: #65676b;
}

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

.remove-account-btn:hover {
    background: #e4e6eb;
    color: #1c1e21;
}

/* Avatar */
.saved-account-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Account Name */
.saved-account-name {
    font-size: 17px;
    font-weight: 600;
    color: #1c1e21;
    text-align: center;
    margin-bottom: 4px;
    word-break: break-word;
    max-width: 100%;
}

/* Account Email */
.saved-account-email {
    font-size: 13px;
    color: #65676b;
    text-align: center;
    word-break: break-word;
    max-width: 100%;
}

/* Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: #8a8d91;
    font-size: 14px;
}

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

.login-divider span {
    padding: 0 16px;
}

/* Remember Me Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin: 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #1877f2;
}

.form-check-label {
    font-size: 14px;
    color: #1c1e21;
    cursor: pointer;
    user-select: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .saved-accounts-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .saved-account-card {
        padding: 16px 12px 12px;
        min-height: 160px;
    }

    .saved-account-avatar {
        width: 80px;
        height: 80px;
        font-size: 30px;
        margin-bottom: 10px;
    }

    .saved-account-name {
        font-size: 15px;
    }

    .saved-account-email {
        font-size: 12px;
    }

    .saved-accounts-title {
        font-size: 15px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .saved-accounts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .saved-account-card {
        padding: 14px 10px 10px;
        min-height: 150px;
    }

    .saved-account-avatar {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}

/* Animation for adding/removing accounts */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saved-account-card {
    animation: fadeInUp 0.3s ease;
}

/* Accessibility */
.saved-account-card:focus-visible {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

.remove-account-btn:focus-visible {
    outline: 2px solid #1877f2;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .saved-account-card {
        background: #242526;
        border-color: #3e4042;
    }

    .saved-account-card:hover {
        border-color: #1877f2;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .saved-account-name {
        color: #e4e6eb;
    }

    .saved-account-email {
        color: #b0b3b8;
    }

    .saved-accounts-title {
        color: #e4e6eb;
    }

    .login-divider {
        color: #b0b3b8;
    }

    .login-divider::before,
    .login-divider::after {
        border-bottom-color: #3e4042;
    }

    .remove-account-btn {
        background: #3a3b3c;
        color: #b0b3b8;
    }

    .remove-account-btn:hover {
        background: #4e4f50;
        color: #e4e6eb;
    }

    .form-check-label {
        color: #e4e6eb;
    }
}

/* Loading state */
.saved-account-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Empty state */
.saved-accounts-empty {
    text-align: center;
    padding: 20px;
    color: #65676b;
    font-size: 14px;
}
