﻿/* regos-oauth-sdk.css */

/* === Основная кнопка === */
.regos-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    transition: background 0.18s, color 0.18s, border 0.18s;
    box-sizing: border-box;
    position: relative;
    user-select: none;
}

/* Тип: только текст */
.regos-oauth-btn--text {
    background: var(--regos-btn-bg, #fff);
    color: var(--regos-btn-color, #000);
    border: 1px solid var(--regos-btn-border, #ccc);
}

/* Тип: иконка + текст */
.regos-oauth-btn--icon-text {
    background: var(--regos-btn-bg, #fff);
    color: var(--regos-btn-color, #000);
    border: 1px solid var(--regos-btn-border, #ccc);
}

/* Тип: только иконка */
.regos-oauth-btn--icon {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* --- Размеры кнопки --- */
.regos-oauth-btn--xs {
    width: 32px;
    height: 32px;
    font-size: 12px;
    padding: 0;
}

.regos-oauth-btn--s {
    width: 36px;
    height: 36px;
    font-size: 14px;
    padding: 0;
}

.regos-oauth-btn--m {
    width: 44px;
    height: 44px;
    font-size: 16px;
    padding: 0;
}

.regos-oauth-btn--l {
    width: 52px;
    height: 52px;
    font-size: 18px;
    padding: 0;
}

.regos-oauth-btn--xl {
    width: 64px;
    height: 64px;
    font-size: 22px;
    padding: 0;
}

/* --- Размеры для text и icon-text --- */
.regos-oauth-btn--xs.regos-oauth-btn--text,
.regos-oauth-btn--xs.regos-oauth-btn--icon-text {
    padding: 4px 10px;
    font-size: 12px;
    width: auto;
    height: auto;
}

.regos-oauth-btn--s.regos-oauth-btn--text,
.regos-oauth-btn--s.regos-oauth-btn--icon-text {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
    height: auto;
}

.regos-oauth-btn--m.regos-oauth-btn--text,
.regos-oauth-btn--m.regos-oauth-btn--icon-text {
    padding: 12px 24px;
    font-size: 16px;
    width: auto;
    height: auto;
}

.regos-oauth-btn--l.regos-oauth-btn--text,
.regos-oauth-btn--l.regos-oauth-btn--icon-text {
    padding: 16px 32px;
    font-size: 18px;
    width: auto;
    height: auto;
}

.regos-oauth-btn--xl.regos-oauth-btn--text,
.regos-oauth-btn--xl.regos-oauth-btn--icon-text {
    padding: 22px 40px;
    font-size: 22px;
    width: auto;
    height: auto;
}

/* --- Темы --- */
.regos-oauth-btn--light {
    --regos-btn-bg: #fff;
    --regos-btn-color: #000;
    --regos-btn-border: #ccc;
}

.regos-oauth-btn--dark {
    --regos-btn-bg: #333;
    --regos-btn-color: #fff;
    --regos-btn-border: #666;
}

/* --- Скругления (от 0 до 32) --- */
.regos-oauth-btn--radius-0 {
    border-radius: 0;
}

.regos-oauth-btn--radius-2 {
    border-radius: 2px;
}

.regos-oauth-btn--radius-4 {
    border-radius: 4px;
}

.regos-oauth-btn--radius-6 {
    border-radius: 6px;
}

.regos-oauth-btn--radius-8 {
    border-radius: 8px;
}

.regos-oauth-btn--radius-10 {
    border-radius: 10px;
}

.regos-oauth-btn--radius-12 {
    border-radius: 12px;
}

.regos-oauth-btn--radius-14 {
    border-radius: 14px;
}

.regos-oauth-btn--radius-16 {
    border-radius: 16px;
}

.regos-oauth-btn--radius-20 {
    border-radius: 20px;
}

.regos-oauth-btn--radius-24 {
    border-radius: 24px;
}

.regos-oauth-btn--radius-28 {
    border-radius: 28px;
}

.regos-oauth-btn--radius-32 {
    border-radius: 32px;
}

/* --- Иконка внутри кнопки --- */
.regos-oauth-btn__icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

.regos-oauth-btn--icon .regos-oauth-btn__icon {
    width: 100%;
    height: 100%;
}

.regos-oauth-btn--icon-text .regos-oauth-btn__icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.regos-oauth-btn--text .regos-oauth-btn__icon {
    display: none;
}

/* --- SVG-иконки --- */
.regos-icon-light, .regos-icon-dark {
    width: 100%;
    height: 100%;
    background: url('https://regos.uz/images/favicon.svg') center/contain no-repeat;
}

/* --- Текст внутри кнопки --- */
.regos-oauth-btn__text {
    white-space: nowrap;
    display: inline-block;
}

/* --- Анимация и hover --- */
.regos-oauth-btn--light:hover {
    background: #f3f3f3;
}

.regos-oauth-btn--dark:hover {
    background: #222;
}

.regos-oauth-btn:active {
    opacity: 0.92;
}

/* --- Accessibility --- */
.regos-oauth-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ====== Остальной CSS для профиля и дропаунов (оставить как есть) ====== */

/* Wrapper */
.regos-oauth-relative {
    position: relative;
}

/* Avatar button */
.regos-oauth-avatar-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    background-color: #4b5563;
    color: #fff;
    font-size: 14px;
    padding: 0px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

    .regos-oauth-avatar-button:focus {
        outline: none;
    }

/* Avatar image */
.regos-oauth-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Initials span */
.regos-oauth-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ccc;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* Dropdown */
.regos-oauth-dropdown {
    position: absolute;
    top: 100%;
    width: 256px;
    background-color: #fff;
    color: #1f2937;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    z-index: 50;
    min-width: 200px;
}

/* User info */
.regos-oauth-user-info {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

/* User name */
.regos-oauth-user-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User email */
.regos-oauth-user-email {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu */
.regos-oauth-menu {
    padding: 8px;
}

/* Menu item */
.regos-oauth-menu-item {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
}

    .regos-oauth-menu-item:hover {
        background-color: #f3f4f6;
    }

/* Logout item */
.regos-oauth-logout {
    color: #dc2626;
}

    .regos-oauth-logout:hover {
        background-color: #fef2f2;
        color: #dc2626;
    }
