@import url('https://fonts.googleapis.com/css2?family=Yanone+Kaffeesatz:wght@300;400;700&display=swap');

.mh-page-block {
    max-width: 480px;
    margin: 24px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.mh-header-image {
    display: block;
    width: 100%;
    height: auto;
}

.mh-form-wrapper,
.mh-gallery-wrapper {
    margin: 0;
    padding: 24px 20px;
    font-family: 'Yanone Kaffeesatz', sans-serif;
    font-weight: 400;
    color: #3a3226;
    box-sizing: border-box;
    background: #e9c27f;
}
.mh-form-wrapper *,
.mh-gallery-wrapper * {
    box-sizing: border-box;
}

.mh-field { margin-bottom: 20px; }
.mh-field label { display: block; margin-bottom: 8px; font-size: 15px; color: #6b5d47; }
.mh-field input[type="text"],
.mh-field input[type="password"],
.mh-field input[type="number"],
.mh-field textarea {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #d8cdb8;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    background: #fffdf8;
}
.mh-field textarea { resize: vertical; }

.mh-honeypot { position: absolute; left: -9999px; opacity: 0; }

.mh-login-error {
    text-align: center;
    color: #9d261e;
    background: rgba(157, 38, 30, 0.1);
    border: 1px solid rgba(157, 38, 30, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.mh-captcha-field {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mh-captcha-field label {
    margin-bottom: 0;
    white-space: nowrap;
}
.mh-captcha-field input {
    width: 70px;
    flex: none;
    text-align: center;
}
.mh-captcha-field input::-webkit-outer-spin-button,
.mh-captcha-field input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.mh-captcha-field input[type="number"] {
    -moz-appearance: textfield;
}

.mh-dropzone {
    border: 2px dashed #c9b98a;
    border-radius: 8px;
    padding: 30px 16px;
    text-align: center;
    background: #fbf8f0;
    transition: background 0.2s, border-color 0.2s;
}
.mh-dropzone.mh-dragover { background: #f3ecd8; border-color: #a68f5c; }
.mh-dropzone p { margin: 0 0 6px; color: #6b5d47; }

.mh-upload-icon {
    display: block;
    margin: 0 auto 12px;
}

.mh-btn-choose {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 2px !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #3a3226 !important;
    color: #3a3226 !important;
    border-radius: 0 !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    outline: none !important;
}

.mh-file-list { margin-top: 12px; }
.mh-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f3ecd8;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 14px;
}
.mh-file-remove {
    background: none;
    border: none;
    color: #a02c2c;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.mh-btn-submit {
    width: 100%;
    padding: 14px !important;
    background: #9d261e !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.mh-btn-submit:disabled { opacity: 0.6; cursor: default; }
.mh-btn-submit:focus,
.mh-btn-choose:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #3a3226 !important;
}

.mh-status {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: #6b5d47;
    min-height: 20px;
}

/* Galerie */
.mh-filter-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    justify-content: center;
}
.mh-avatar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    width: 68px;
}
.mh-avatar-circle-wrap {
    position: relative;
    width: 52px;
    height: 52px;
}
.mh-avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}
.mh-avatar-gender-toggle {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d8cdb8;
    color: #6b5d47;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.mh-avatar-item span {
    font-size: 13px;
    color: #3a3226;
    text-align: center;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mh-avatar-item:hover .mh-avatar-circle {
    transform: scale(1.06);
}
.mh-avatar-active .mh-avatar-circle {
    border-color: #9d261e;
}
.mh-avatar-active span {
    font-weight: 700;
}

.mh-mot-doux-display {
    text-align: center;
    margin-bottom: 22px;
    padding: 0 10px;
}
.mh-quote-mark {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 56px;
    font-weight: 700;
    color: #9d261e;
    line-height: 0;
    vertical-align: -18px;
}
.mh-quote-text {
    font-size: 19px;
    font-style: italic;
    color: #6b5d47;
    margin: 0 6px;
}
.mh-mot-doux-caption {
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    color: #3a3226;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.mh-mot-doux-rule {
    height: 1px;
    width: 60%;
    margin: 10px auto;
    background: linear-gradient(to right, transparent, #a68f5c 50%, transparent);
}
.mh-mot-doux-quote {
    padding: 4px 0;
}

.mh-admin-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mh-btn-admin-danger {
    padding: 10px 18px;
    background: #1a1a1a;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.mh-card-checkbox {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #3a3226;
    cursor: pointer;
    z-index: 3;
}
.mh-card-selected .mh-card-checkbox {
    background: #9d261e;
    border-color: #9d261e;
}
.mh-card-selected .mh-card-checkbox::after {
    content: '\2713';
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 15px;
    font-weight: 700;
}
.mh-card-selected {
    outline: 3px solid #9d261e;
    outline-offset: -3px;
}

.mh-gallery-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.mh-gallery-filters select {
    flex: 1;
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid #d8cdb8;
    border-radius: 6px;
    background: #fffdf8;
    font-family: inherit;
}

.mh-date-header {
    margin: 24px 0 12px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #a68f5c;
    border-bottom: 1px solid #e3d9c0;
    padding-bottom: 6px;
    text-transform: capitalize;
}

.mh-gallery-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.mh-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
}
.mh-card img,
.mh-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mh-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 28px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}
.mh-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    color: #fff;
    font-size: 11px;
}
.mh-card-info p { margin: 2px 0 0; opacity: 0.9; }

.mh-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
.mh-pager-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(58, 50, 38, 0.25);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #6b5d47;
}
.mh-pager-btn:hover:not(:disabled) {
    background: rgba(58, 50, 38, 0.08);
}
.mh-pager-btn:disabled {
    opacity: 0.4;
    cursor: default;
}
.mh-pager-info {
    font-size: 13px;
    color: #6b5d47;
}

.mh-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mh-lightbox-media-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.mh-lightbox img,
.mh-lightbox video {
    max-width: calc(100vw - 140px);
    max-height: 92vh;
    display: block;
}
.mh-lightbox-nav {
    position: static;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mh-lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.mh-lightbox-nav[hidden] { display: none; }

@media (max-width: 480px) {
    .mh-lightbox-media-wrap { gap: 6px; }
    .mh-lightbox-nav { width: 34px; height: 34px; font-size: 14px; }
    .mh-lightbox img,
    .mh-lightbox video { max-width: calc(100vw - 88px); }
}
.mh-lightbox-close {
    position: absolute;
    top: 40px;
    right: 32px;
    background: rgba(0, 0, 0, 0.4);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 48px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .mh-gallery-content {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}
