/*
 * Strawhouse - style UI (sekcje w ramkach, przyciski, komunikaty)
 * Plik: wp-content/plugins/strawhouse-account/assets/css/strawhouse-ui.css
 * Ładowany przez modules/ui-styles.php.
 *
 * Zasady:
 *  - Ramka sekcji: 1px, radius 10, kolor rgb(41, 25, 16)
 *  - Przyciski: WIELKIE LITERY, outline, radius 6, depth 2
 *  - Success = cofanie / anulowanie / usuwanie
 *  - Secondary = potwierdzanie / przechodzenie dalej
 */

:root {
    --sh-border-color: rgb(41, 25, 16);
    --sh-border-soft: rgba(41, 25, 16, 0.25);
    --sh-radius-section: 10px;
    --sh-radius-button: 6px;
    --sh-accent: var(--fs-color-secondary, var(--secondary-color, #2e7d6b));
}

/* ---------- SEKCJE W RAMKACH ---------- */
.sh-section {
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-section);
    padding: 20px;
    margin-bottom: 30px;
    background: transparent;
}
.sh-section > :last-child { margin-bottom: 0; }

.sh-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}
.sh-section__title {
    margin: 0;
    display: flex;
    align-items: center;
}
.sh-section__toggle {
    font-size: 16px;
    line-height: 1;
    color: var(--sh-accent);
    transition: transform 0.3s ease;
}
.sh-section__content {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sh-border-soft);
}

/* ---------- AWATARY ---------- */
.sh-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}
.sh-avatar-option { text-align: center; }
.sh-avatar-option__label {
    margin: 0 0 10px;
    font-weight: 700;
}
.sh-avatar-option img,
.sh-preview-img {
    display: block;
    margin: 0 auto 15px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--sh-border-soft);
}
.sh-avatar-option.is-active img { border-color: var(--sh-accent); }
.sh-preview-img { width: 100px; height: 100px; margin: 0 0 15px; border-width: 2px; }
img.avatar-custom { border-radius: 50%; object-fit: cover; }

/* ---------- FORMULARZ UPLOADU ---------- */
.sh-upload-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}
.sh-upload-info {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 15px;
}
.sh-actions { margin-top: 15px; }

/* ---------- PRZYCISKI (Flatsome: .button + .secondary / .success + .is-outline) ---------- */
.sh-section .button,
.sh-btn {
    text-transform: uppercase !important;
    border-radius: var(--sh-radius-button) !important;
    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    margin-bottom: 0;
    margin-right: 0;
    transition: box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.sh-section .button:hover,
.sh-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}
.sh-section .button[disabled],
.sh-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.sh-btn--small {
    font-size: 0.75em;
    min-height: 2em;
    line-height: 1.9em;
    padding: 0 1em;
}

/* ---------- KOMUNIKATY STATUSU ---------- */
.sh-status { margin-top: 15px; }
.sh-status__msg { font-weight: 600; }
.sh-status__msg--info { color: var(--sh-accent); }
.sh-status__msg--success { color: #2e7d32; }
.sh-status__msg--error { color: #b3261e; }

/* ---------- WYMAGANIA USERNAME ---------- */
.username-requirements.sh-section {
    padding: 15px 20px;
    margin-bottom: 15px;
    font-size: 13px;
}
.username-requirements ul { margin: 5px 0 0 20px; padding: 0; }
.username-requirements li { margin-bottom: 2px; }

/* ---------- POWIADOMIENIA (rejestracja / wylogowanie) ---------- */
.sh-notice {
    border: 1px solid var(--sh-border-color);
    border-radius: var(--sh-radius-section);
    padding: 12px 20px;
    margin: 15px 0;
    background: transparent;
}
.sh-notice--success { font-weight: 600; }

/* ---------- LINK DELETE W KOMENTARZACH ---------- */
.comment-delete-link { margin-top: 10px; text-align: right; }

/* ---------- TABELE (rankingi itp.) ---------- */
.sh-section > .sh-section__title { margin-bottom: 15px; }
.sh-table-wrap { overflow-x: auto; }
.sh-table { width: 100%; border-collapse: collapse; margin: 0; }
.sh-table th,
.sh-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--sh-border-soft);
}
.sh-table th {
    text-transform: uppercase;
    font-size: 0.8em;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--sh-border-color);
}
.sh-table tr:last-child td { border-bottom: 0; }
.sh-table .num { text-align: right; width: 1%; white-space: nowrap; }
.sh-table tr.is-me td { font-weight: 700; background: rgba(41, 25, 16, 0.06); }
