/* Avatar picker: preset selection and image upload for community users
   Scope: .aynih-avatar-picker
   Colors: navy/gold matching the site theme
*/

/* ---- Wrapper ---- */
.aynih-avatar-picker {
    margin: 24px 0;
    padding: 20px;
    border: 1px solid rgba(215, 181, 109, .25);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
}

.aynih-avatar-picker legend,
.aynih-avatar-section-title {
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(215, 181, 109, .8);
    margin-bottom: 16px;
}

/* ---- Aktuelle Vorschau ---- */
.aynih-avatar-current {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.aynih-avatar-current img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(215, 181, 109, .45);
    flex-shrink: 0;
}

.aynih-avatar-current-label {
    font-size: .85rem;
    color: rgba(255, 255, 255, .55);
}

/* ---- Tabs ---- */
.aynih-avatar-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    margin-bottom: 16px;
}

.aynih-avatar-tab {
    padding: 8px 18px;
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .5);
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}

.aynih-avatar-tab:hover {
    color: rgba(255, 255, 255, .85);
}

.aynih-avatar-tab.is-active {
    color: rgba(215, 181, 109, .95);
    border-bottom-color: rgba(215, 181, 109, .85);
}

/* ---- Preset-Grid ---- */
.aynih-avatar-panel {
    min-height: 80px;
}

/* Scroll-Container fuer das Grid */
.aynih-preset-scroll {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(215, 181, 109, .4) rgba(255, 255, 255, .06);
}

.aynih-preset-scroll::-webkit-scrollbar {
    width: 5px;
}

.aynih-preset-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
    border-radius: 4px;
}

.aynih-preset-scroll::-webkit-scrollbar-thumb {
    background: rgba(215, 181, 109, .4);
    border-radius: 4px;
}

.aynih-preset-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .aynih-preset-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.aynih-preset-item {
    cursor: pointer;
    border-radius: 50%;
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: outline-color .15s, transform .1s;
    aspect-ratio: 1;
    overflow: hidden;
    max-width: 52px;
    justify-self: center;
    width: 100%;
}

.aynih-preset-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    pointer-events: none;
}

.aynih-preset-item:hover {
    outline-color: rgba(215, 181, 109, .5);
    transform: scale(1.06);
}

.aynih-preset-item.is-selected {
    outline-color: rgba(215, 181, 109, .95);
    transform: scale(1.06);
}

/* ---- Upload-Bereich ---- */
.aynih-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aynih-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid rgba(215, 181, 109, .45);
    background: rgba(215, 181, 109, .1);
    color: rgba(215, 181, 109, .9);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: background .15s, border-color .15s;
}

.aynih-upload-label:hover {
    background: rgba(215, 181, 109, .2);
    border-color: rgba(215, 181, 109, .7);
}

/* Echtes File-Input verstecken, Label ist der Button */
#aynih-avatar-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.aynih-upload-hint {
    font-size: .78rem;
    color: rgba(255, 255, 255, .4);
}

.aynih-upload-preview {
    display: none;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(215, 181, 109, .45);
}

.aynih-upload-preview.is-visible {
    display: block;
}

/* ---- Submit-Buttons nebeneinander ---- */
.aynih-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.aynih-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none;
    line-height: 1;
}

.aynih-btn:hover {
    transform: translateY(-1px);
}

.aynih-btn-save {
    background: rgba(215, 181, 109, .95);
    color: #1a1a2e;
    box-shadow: 0 2px 10px rgba(215, 181, 109, .25);
}

.aynih-btn-save:hover {
    background: rgba(215, 181, 109, 1);
    box-shadow: 0 4px 16px rgba(215, 181, 109, .4);
}

.aynih-btn-cancel {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .65);
    border: 1px solid rgba(255, 255, 255, .15);
}

.aynih-btn-cancel:hover {
    background: rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .85);
}

/* ---- Avatar-Anzeige auf Profilseite ---- */
.aynih-profile-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.aynih-profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(215, 181, 109, .5);
    flex-shrink: 0;
}

.aynih-profile-avatar-name {
    font-size: 1.1rem;
    font-weight: 700;
}

/* ---- Kleine Avatar-Darstellung (Forum, Infoboard) ---- */
.aynih-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.aynih-avatar-xs {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
