/* Amuzanta mobile layout.
   This file is loaded only below 800px. Desktop rules remain untouched. */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.site-header {
    position: relative;
}

.site-header::before,
.site-header::after {
    display: none;
}

.site-header > header,
.main-nav,
.sub-nav {
    width: calc(100% - 1rem);
    max-width: none;
}

.site-header > header {
    margin-top: 0.75rem;
}

.branding {
    width: 100%;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.branding-logo {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 3.25rem;
}

.branding-banner {
    width: auto;
    height: 3.25rem;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    object-fit: contain;
    object-position: left center;
}

.header-search {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
}

.header-search input[type="search"] {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
}

.header-search select,
.header-search button {
    min-height: 2.25rem;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    padding: 0.6rem 0.5rem;
    line-height: 1.4;
}

.cuvant-nav-link {
    display: inline;
}

.sub-nav {
    height: auto;
    min-height: 0;
    padding: 0.25rem 0.25rem 0.5rem;
    line-height: 1.2;
    text-align: right;
}

.sub-nav a {
    transform: none;
    margin: 0 0.25rem;
}

body > main,
body > .page-layout {
    width: 100%;
    max-width: none;
}

body > main {
    padding: 0.75rem;
}

.page-layout {
    display: block;
    width: 100%;
    margin: 0;
}

.page-layout > main {
    width: 100%;
    min-height: 0;
    padding: 0.75rem;
}

.page-layout > .applet {
    display: none;
}

.page-section {
    width: 100%;
}

.mobile-actions[hidden] {
    display: flex !important;
}

.mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-top: 1px dashed currentColor;
    border-bottom: 1px dashed currentColor;
}

.mobile-actions a {
    display: inline-block;
    border: 1px dashed #ffbb00;
    padding: 0.5rem 0.75rem;
    background: white;
    color: #ffbb00;
}

.mobile-actions a:hover {
    text-decoration: underline;
}

.sectiuni-previzualizari {
    grid-template-columns: 1fr;
    column-gap: 0;
}

.sectiune-previzualizare {
    grid-template-columns: auto auto minmax(0, 1fr);
}

.section-mini-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
}

.section-sort {
    width: 100%;
}

.section-sort select {
    width: 100%;
    min-height: 2.25rem;
}

.subiect {
    padding: 0.75rem;
}

.subiect-op-meta,
.profil-meta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.subiect-op-date {
    text-align: left;
}

.postare {
    padding: 0.75rem;
}

.postare-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.postare-imagine img {
    max-height: 65vh;
    max-width: 100%;
}

.postare-imagine {
    margin: 0.75rem 0;
}

.mesaj {
    padding: 0.75rem;
}

.mesaj-detalii {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mesaj-actiuni {
    flex-direction: column;
    align-items: stretch;
}

.mesaj-actiuni form,
.mesaj-actiuni button {
    width: 100%;
}

.page-bar {
    margin-top: 1.25rem;
}

.page-bar-controls {
    width: 100%;
    gap: 0.5rem;
}

.page-bar-controls a {
    min-width: 2rem;
    padding: 0.25rem;
}

.profil-interese .profil-interes {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.profil-editare-form {
    align-self: flex-start;
}

.member {
    padding: 0.75rem 0;
}

.member form button {
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
}

.auth-form input,
.auth-form textarea,
.auth-form select,
.page-section input,
.page-section textarea,
.page-section select,
.standalone-applet input,
.standalone-applet textarea,
.standalone-applet select {
    min-height: 2.25rem;
}

textarea {
    max-width: 100%;
}

input[type="file"] {
    width: 100%;
    max-width: 100%;
}

button,
select,
input,
textarea {
    font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    font-size: 16px;
}

.standalone-applet {
    padding-top: 0.5rem;
}

.standalone-applet .write-subject-applet,
.standalone-applet .write-post-applet,
.standalone-applet .write-message-applet {
    width: 100%;
}

.write-subject-applet form,
.write-post-applet form,
.write-message-applet form {
    width: 100%;
}

.write-subject-applet button,
.write-post-applet button,
.write-message-applet button {
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
}

.etichete-fereastra {
    left: 0.5rem;
    top: 10vh;
    width: calc(100vw - 1rem);
    height: 80vh;
    max-height: 80vh;
}

.lista-etichete {
    height: calc(80vh - 9rem);
    max-height: calc(80vh - 9rem);
}

.etichete-fereastra-butoane {
    flex-wrap: wrap;
}

.etichete-fereastra-butoane button {
    min-height: 2.25rem;
}

footer {
    margin: 0.75rem auto;
    padding: 0.75rem;
}

.search-result,
.member {
    overflow-wrap: anywhere;
}

@media (max-width: 360px) {
    .branding-logo {
        width: 2.75rem;
        height: 2.75rem;
        flex-basis: 2.75rem;
    }

    .branding-banner {
        height: 2.75rem;
    }

    .main-nav {
        gap: 0.2rem 0.35rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }
}

/* Mobile: auth applet is redundant because its actions are available in the mobile navigation. */
@media (max-width: 800px) {
    #auth-applet,
    .auth-applet,
    .mini-auth,
    .mini-auth-applet {
        display: none !important;
    }
}

/* Credits page */
.credits-page {
    text-align: center;
    margin: 0 auto;
    padding: 3rem 1rem;
}
.credits-page h3 {
    color: #0000AA;
    margin: 1.5rem 0 0.35rem;
}
.credits-page h3:first-child {
    margin-top: 0;
}
.credits-page div {
    color: #000000;
    margin: 0.2rem 0;
}

.discord-button {
    display: inline-block;
    padding: 0.35em 0.8em;
    margin: 0.5em 0;
}

.cuvant-applet-side {
    display: none;
}


.cuvant-rezultate-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.cuvant-standalone {
    width: 100%;
}

.cuvant-board-rezultat {
    max-width: 180px;
}
