/* -----------------------------------------------------------------------
   Escape Zoo — Teams
   این فایل را در assets/css/teams.css همان پوشه‌ی افزونه قرار دهید
   ----------------------------------------------------------------------- */

.ezt-teams {
    max-width: 1000px;
    margin: 0 auto;
    background-color: #0c1117;
    color: #ffffff;
    direction: rtl;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ezt-gate {
    max-width: 500px;
    margin: 0 auto;
    background-color: #161b22;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #30363d;
    direction: rtl;
}

.ezt-teams__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #21262d;
}

.ezt-teams__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    color: #00f0ff;
    margin: 0;
}

.ezt-empty {
    color: #8b949e;
    font-size: 13px;
}

/* دکمه‌ها */
.ezt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    transition: all 0.2s ease;
}

.ezt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ezt-btn--glow {
    border: 1px solid #00f0ff;
    color: #00f0ff;
}
.ezt-btn--glow:hover {
    background-color: #00f0ff;
    color: #0c1117;
}

.ezt-btn--outline {
    border: 1px solid #30363d;
    color: #c9d1d9;
}
.ezt-btn--outline:hover {
    border-color: #00f0ff;
    color: #00f0ff;
}

.ezt-btn--danger {
    border: 1px solid #ff3b30;
    color: #ff3b30;
    padding: 4px 10px;
    font-size: 12px;
}
.ezt-btn--danger:hover {
    background-color: #ff3b30;
    color: #fff;
}

/* گرید تیم‌ها */
.ezt-teams__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

.ezt-team-card {
    display: flex;
    gap: 14px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 14px;
    padding: 16px;
}

.ezt-team-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #00f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0c1117;
}

.ezt-team-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ezt-team-card__avatar .dashicons {
    color: #30363d;
    font-size: 26px;
}

.ezt-team-card__name {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.ezt-team-card__meta {
    font-size: 12px;
    color: #8b949e;
    margin: 0 0 10px 0;
}

.ezt-team-card__medals {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.ezt-team-card__medal-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(0, 240, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ezt-team-card__medal-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ezt-team-card__medal-icon .dashicons {
    font-size: 16px;
    color: #00f0ff;
}

.ezt-team-card__badge {
    display: inline-block;
    font-size: 11px;
    color: #00ffaa;
    background: rgba(0,255,170,0.1);
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
}

/* -----------------------------------------------------------------------
   دعوت‌های تیمی من (پنل قبول/رد دعوت‌نامه‌ی عضویت)
   ----------------------------------------------------------------------- */
.ezt-invites {
    margin-bottom: 24px;
    background-color: #161b22;
    border: 1px solid #ffd54a;
    box-shadow: 0 0 14px rgba(255, 213, 74, 0.12);
    border-radius: 14px;
    padding: 16px 18px;
}

.ezt-invites__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #ffd54a;
    margin: 0 0 14px 0;
}

.ezt-invites__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ezt-invite-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #0c1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 10px 14px;
    flex-wrap: wrap;
}

.ezt-invite-row__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #ffd54a;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #161b22;
}
.ezt-invite-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ezt-invite-row__avatar .dashicons {
    color: #30363d;
    font-size: 20px;
}

.ezt-invite-row__info {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ezt-invite-row__team-name {
    font-size: 14px;
    color: #fff;
}

.ezt-invite-row__meta {
    font-size: 12px;
    color: #8b949e;
}

.ezt-invite-row__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ezt-invite-row__actions .ezt-btn {
    padding: 6px 16px;
    font-size: 12px;
}

/* مودال‌ها */
.ezt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
}

.ezt-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(2px);
}

.ezt-modal__box {
    position: relative;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.ezt-modal__box--wide {
    max-width: 560px;
}

.ezt-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.ezt-modal__header h3 {
    margin: 0;
    color: #00f0ff;
    font-size: 16px;
}

.ezt-modal__close {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
.ezt-modal__close:hover {
    color: #ff3b30;
}

/* فرم ساخت تیم */
#ezt-create-team-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
#ezt-create-team-form label {
    font-size: 13px;
    color: #8b949e;
    margin-top: 8px;
}
#ezt-create-team-form input {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #30363d;
    background-color: #0c1117;
    color: #ffffff;
    font-size: 14px;
}
#ezt-create-team-form input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0,240,255,0.2);
}
#ezt-create-team-form button {
    margin-top: 14px;
    align-self: flex-start;
}

.ezt-form-message {
    font-size: 13px;
    margin: 10px 0 0 0;
}

/* پنل مدیریت تیم - سرچ کاربر */
.ezt-manage-team__add-row {
    position: relative;
    margin-bottom: 20px;
}
.ezt-manage-team__add-row label {
    display: block;
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 6px;
}
.ezt-manage-team__add-row input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #30363d;
    background-color: #0c1117;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}
.ezt-manage-team__add-row input:focus {
    outline: none;
    border-color: #00f0ff;
    box-shadow: 0 0 10px rgba(0,240,255,0.2);
}

.ezt-manage-team__add-row-hint {
    font-size: 11px;
    color: #8b949e;
    margin: 6px 0 0 0;
}

.ezt-user-search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin-top: 4px;
    background-color: #0c1117;
    border: 1px solid #30363d;
    border-radius: 10px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 10;
}

.ezt-user-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
}
.ezt-user-search-item:hover {
    background-color: rgba(0,240,255,0.08);
}
.ezt-user-search-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.ezt-user-search-item__name {
    font-size: 13px;
    color: #fff;
}
.ezt-user-search-item__username {
    font-size: 11px;
    color: #8b949e;
}
.ezt-user-search-empty {
    padding: 10px 12px;
    font-size: 12px;
    color: #8b949e;
}

.ezt-manage-team__medals {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ezt-team-medal-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #0c1117;
    border: 1px solid #21262d;
    border-radius: 20px;
    padding: 4px 12px 4px 4px;
    font-size: 12px;
    color: #c9d1d9;
}
.ezt-team-medal-badge img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.ezt-manage-team__members-title {
    font-size: 13px;
    color: #8b949e;
    margin: 0 0 10px 0;
}

.ezt-manage-team__members {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.ezt-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #0c1117;
    border: 1px solid #21262d;
    border-radius: 10px;
    padding: 8px 12px;
}

.ezt-member-row img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ezt-member-row__info {
    flex: 1;
}

.ezt-member-row__name {
    font-size: 13px;
    color: #fff;
    display: block;
}

.ezt-member-row__username {
    font-size: 11px;
    color: #8b949e;
}

.ezt-member-row__leader-tag {
    font-size: 10px;
    color: #00ffaa;
    background: rgba(0,255,170,0.1);
    padding: 2px 8px;
    border-radius: 8px;
    margin-right: 6px;
}

@media (max-width: 600px) {
    .ezt-teams__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ezt-invite-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .ezt-invite-row__actions {
        width: 100%;
    }

    .ezt-invite-row__actions .ezt-btn {
        flex: 1;
        justify-content: center;
    }
}

/* -----------------------------------------------------------------------
   رنکینگ تیم‌ها [escape_zoo_teams_leaderboard]
   ----------------------------------------------------------------------- */
.ezt-leaderboard {
    max-width: 700px;
    margin: 0 auto;
    background-color: #0c1117;
    color: #ffffff;
    direction: rtl;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ezt-leaderboard__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    color: #00f0ff;
    margin: 0 0 22px 0;
}

.ezt-leaderboard__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ezt-leaderboard__row {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 12px 16px;
}

.ezt-leaderboard__rank {
    width: 34px;
    flex-shrink: 0;
    font-size: 14px;
    color: #8b949e;
    text-align: center;
}

/* نفرات اول تا سوم کمی برجسته‌تر */
.ezt-leaderboard__row--rank-1 {
    border-color: #ffd54a;
    box-shadow: 0 0 14px rgba(255, 213, 74, 0.15);
}
.ezt-leaderboard__row--rank-1 .ezt-leaderboard__rank {
    color: #ffd54a;
    font-weight: bold;
}
.ezt-leaderboard__row--rank-2 {
    border-color: #c0c6cf;
}
.ezt-leaderboard__row--rank-2 .ezt-leaderboard__rank {
    color: #c0c6cf;
    font-weight: bold;
}
.ezt-leaderboard__row--rank-3 {
    border-color: #d78a4d;
}
.ezt-leaderboard__row--rank-3 .ezt-leaderboard__rank {
    color: #d78a4d;
    font-weight: bold;
}

.ezt-leaderboard__avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #0c1117;
    border: 2px solid #00f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ezt-leaderboard__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ezt-leaderboard__avatar .dashicons {
    color: #30363d;
    font-size: 20px;
}

.ezt-leaderboard__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ezt-leaderboard__name {
    font-size: 14px;
    color: #fff;
}

.ezt-leaderboard__meta {
    font-size: 12px;
    color: #8b949e;
}

.ezt-leaderboard__points {
    flex-shrink: 0;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #00ffaa;
}
.ezt-leaderboard__points span {
    display: block;
    font-size: 10px;
    font-weight: normal;
    color: #8b949e;
}

@media (max-width: 500px) {
    .ezt-leaderboard__row {
        flex-wrap: wrap;
    }
    .ezt-leaderboard__points {
        width: 100%;
        text-align: left;
    }
}
/* ---------------------------------------------------------------- *
 * بازی تیم و ظرفیت اعضا
 * ---------------------------------------------------------------- */

.ezt-team-card__game {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 2px 0 6px;
    font-size: 13px;
    opacity: 0.85;
}

.ezt-team-card__game .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
}

.ezt-capacity {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    white-space: nowrap;
}

.ezt-capacity--full {
    background: rgba(220, 38, 38, 0.18);
    color: #f87171;
}

.ezt-manage-team__game {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 13px;
}

.ezt-manage-team__game-name {
    font-weight: 600;
}

.ezt-form-note {
    margin: 6px 0 14px;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.8;
}

#ezt-team-game-input {
    width: 100%;
    box-sizing: border-box;
}

#ezt-team-game-input option:disabled {
    opacity: 0.5;
}

/* Safari روی iOS ورودی با فونت کوچک‌تر از ۱۶px را هنگام فوکوس زوم می‌کند.
   #ezt-create-team-form با شناسه نوشته شده، پس اینجا هم باید با شناسه بیاید
   وگرنه اولویتش از آن کمتر می‌شود و بی‌اثر می‌ماند. */
@media (max-width: 782px) {
    #ezt-create-team-form input,
    #ezt-team-game-input,
    .ezt-teams input,
    .ezt-teams select,
    .ezt-teams textarea {
        font-size: 16px;
    }
}
