/* -----------------------------
   GENERAL WIDGET BUTTON
------------------------------ */
.eglv-login-widget {
    display: inline-block;
}

/*
 * Logged-in block: must stay a vertical stack even when placed inside theme
 * wrappers that use flex row (e.g. .egl-header-login from site CSS).
 */
.eglv-login-widget.eglv-login-widget-logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

/* Site header wrapper: keep Steam/image rules separate from eglv-login-widget */
.egl-header-login .eglv-login-widget.eglv-login-widget-logged-in {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    max-width: 160px;
    width: 100%;
}

.egl-header-login .eglv-login-profile-vertical {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: flex-start;
	width: 100%;
	max-width: 180px;
	box-sizing: border-box;
}

.eglv-login-open-button {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #1abc9c;
    background: #111;
    color: #1abc9c;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}
.eglv-login-open-button:hover {
    background: #1abc9c;
    color: #000;
    box-shadow: 0 0 10px rgba(0,255,200,0.4);
}

/* -----------------------------
   LOGGED-IN PROFILE (VERTICAL)
------------------------------ */
.eglv-login-profile-vertical {
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	align-items: center;
	justify-content: flex-start;
	text-align: center;
	width: 100%;
	max-width: 200px;
	margin: 0 auto;
	box-sizing: border-box;
	gap: 10px;
}

/* Fixed circular slot — layout never shifts; image clips inside */
.eglv-login-avatar-link {
	display: block !important;
	flex: 0 0 auto;
	order: 1;
	width: 96px;
	height: 96px;
	line-height: 0;
	border-radius: 50%;
	overflow: hidden;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.45);
	float: none !important;
}

.eglv-login-avatar,
.eglv-login-avatar-placeholder {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	box-sizing: border-box;
	border-radius: 0;
	object-fit: cover;
	object-position: center center;
	margin: 0;
	padding: 0;
	border: none;
	vertical-align: top;
}

.eglv-login-avatar-placeholder {
	background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
}

/* Username: always between avatar and logout */
.eglv-login-name {
	display: block !important;
	order: 2;
	width: 100%;
	max-width: 200px;
	flex: 0 0 auto;
	float: none !important;
	clear: both !important;
	margin: 0;
	padding: 0 4px;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.3;
	color: #0ff !important;
	text-decoration: none !important;
	text-align: center;
	word-break: break-word;
}

.eglv-login-name:hover,
.eglv-login-name:focus {
	color: #7fffff !important;
	text-decoration: underline !important;
	outline: none;
}

/* Logout always last */
.eglv-logout-form {
	display: block !important;
	order: 3;
	width: 100%;
	max-width: 200px;
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
	float: none !important;
	text-align: center;
}

/* Logout button (larger, nicer) */
.eglv-logout-button {
	width: 100%;
	max-width: 140px;
	padding: 8px 0;
	border-radius: 10px;
	font-size: 0.9rem;
	border: 1px solid #555;
	background: #222;
	color: #ccc;
	cursor: pointer;
	transition: 0.2s;
	margin: 0 auto;
	display: block;
}

.eglv-logout-button:hover {
    background: #d9534f;
    border-color: #d9534f;
    color: #fff;
}


/* -----------------------------
   MODAL WINDOW
------------------------------ */
.eglv-login-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}
.eglv-login-modal.is-open {
    display: block;
}
.eglv-login-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.eglv-login-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #111;
    color: #eee;
    border-radius: 10px;
    padding: 20px 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    border: 1px solid #333;
}

.eglv-login-modal-dialog h2 {
    margin-top: 0;
    color: #0ff;
}

.eglv-login-modal-dialog p {
    color: #ccc;
}

.eglv-login-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}
.eglv-login-modal-close:hover {
    color: #fff;
}

/* -----------------------------
   PROVIDER GRID & TILES
------------------------------ */
.eglv-login-provider-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.eglv-login-provider-tile {
    flex: 1 1 45%;
    min-width: 140px;
    text-align: center;
    padding: 12px 8px;
    border-radius: 8px;
    border: 1px solid #333;
    text-decoration: none;
    color: #eee;
    background: #181818;
    transition: all 0.2s ease;
}

.eglv-login-provider-tile:hover {
    background: #222;
    border-color: #0ff;
    box-shadow: 0 0 12px rgba(0,255,255,0.3);
}

.eglv-login-provider-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 6px;
    border-radius: 50%;
    background: #1abc9c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
}

.eglv-login-provider-label {
    font-size: 0.9rem;
}

.eglv-login-provider-wordpress .eglv-login-provider-icon {
    background: #0073aa;
    color: #fff;
}

/* -----------------------------
   Reusable header block (.egl-header-container + .egl-header-login)
   Your synced block still styles legacy .steam-user-info / .steam-login;
   Login Vault outputs .eglv-* only — these rules mirror that intent.
------------------------------ */
.egl-header-container .egl-header-login {
	min-width: 0;
	flex: 1 1 auto;
}

/* Fixed circle lives on the link wrapper; img fills slot */
.egl-header-container .egl-header-login .eglv-login-avatar-link {
	width: 96px !important;
	height: 96px !important;
	flex: 0 0 96px !important;
}

.egl-header-container .egl-header-login .eglv-login-avatar,
.egl-header-container .egl-header-login .eglv-login-avatar-placeholder {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	box-sizing: border-box;
	border-radius: 0;
	object-fit: cover;
}

.egl-header-container .egl-header-login .eglv-login-name {
	color: #0ff !important;
	font-size: 0.95rem !important;
	margin: 0 !important;
	text-decoration: none !important;
	text-align: center !important;
	display: block !important;
	width: 100% !important;
	float: none !important;
}

.egl-header-container .egl-header-login .eglv-logout-button {
	background-color: #1b2838;
	color: #fff;
	padding: 8px 12px;
	border-radius: 5px;
	font-size: 0.85rem;
	width: auto;
	max-width: 100%;
}

.egl-header-container .egl-header-login .eglv-logout-button:hover {
	background-color: #66c0f4;
	color: #000;
}
