/* Rautavaaran Mummonmökkimessut — frontend styles */

/* ===== Reset & base ===== */
.rmm-main-wrap,
.rmm-single-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    color: #1d2327;
    line-height: 1.5;
}

.rmm-main-wrap *,
.rmm-single-wrap * {
    box-sizing: border-box;
}

/* ===== Header ===== */
.rmm-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2c5f3d 0%, #4a8b5c 100%);
    color: #fff;
    border-radius: 12px;
}

.rmm-header-title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: #fff;
}

.rmm-header-dates {
    margin: 0;
    font-size: 1.125rem;
    opacity: 0.9;
}

.rmm-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #fff;
    color: #2c5f3d;
    border: none;
    border-radius: 8px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.rmm-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rmm-add-btn-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    background: #2c5f3d;
    color: #fff;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: bold;
}

/* ===== Filters ===== */
.rmm-listing-section {
    margin-top: 1rem;
}

.rmm-filters {
    background: #f6f7f7;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.rmm-filters-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #50575e;
}

.rmm-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.rmm-filters-row label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #50575e;
}

.rmm-filters-row input,
.rmm-filters-row select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9375rem;
}

.rmm-filters-row input:focus,
.rmm-filters-row select:focus {
    border-color: #2c5f3d;
    outline: 2px solid rgba(44, 95, 61, 0.2);
    outline-offset: -1px;
}

.rmm-filter-reset {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    color: #50575e;
    cursor: pointer;
    font-size: 0.875rem;
    height: 38px;
}

.rmm-filter-reset:hover {
    background: #f0f0f1;
}

.rmm-listing-meta {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #50575e;
}

/* ===== Grid ===== */
.rmm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.rmm-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.rmm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.rmm-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f0f0f1;
    overflow: hidden;
}

.rmm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmm-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, #e8f0e9 0%, #d0e0d3 100%);
}

.rmm-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: rgba(44, 95, 61, 0.95);
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rmm-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.rmm-card-title {
    margin: 0 0 0.375rem;
    font-size: 1.125rem;
    line-height: 1.3;
}

.rmm-card-title a {
    color: #1d2327;
    text-decoration: none;
}

.rmm-card-title a:hover {
    color: #2c5f3d;
}

.rmm-card-location {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: #50575e;
}

.rmm-card-price {
    margin: 0 0 1rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: #2c5f3d;
}

.rmm-card-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #50575e;
}

.rmm-card-stats li {
    padding: 0.25rem 0.5rem;
    background: #f6f7f7;
    border-radius: 4px;
}

.rmm-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #50575e;
    font-style: italic;
    grid-column: 1 / -1;
}

/* ===== Modal ===== */
/* Modal: hidden by default, shown only when [hidden] attribute is removed */
.rmm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
}

.rmm-modal:not([hidden]) {
    display: flex;
}

.rmm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.rmm-modal-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 2rem 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.rmm-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: #f0f0f1;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #1d2327;
}

.rmm-modal-close:hover {
    background: #dcdcde;
}

/* ===== Form ===== */
.rmm-form-wrap h2 {
    margin: 0 0 0.5rem;
    color: #2c5f3d;
}

.rmm-form-intro {
    margin: 0 0 1.5rem;
    color: #50575e;
    line-height: 1.6;
}

.rmm-section {
    border: none;
    padding: 0;
    margin: 0 0 2rem;
}

.rmm-section legend {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #2c5f3d;
    padding: 0 0 0.5rem;
    border-bottom: 2px solid #e8f0e9;
    width: 100%;
    margin-bottom: 1rem;
}

.rmm-section-help {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #50575e;
    font-style: italic;
}

.rmm-section-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.rmm-section-tarina .rmm-section-fields,
.rmm-section-lisatiedot .rmm-section-fields,
.rmm-section-varustelu .rmm-section-fields {
    grid-template-columns: 1fr;
}

.rmm-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.rmm-field label,
.rmm-field-label {
    font-weight: 500;
    font-size: 0.9375rem;
    color: #1d2327;
}

.rmm-required {
    color: #d63638;
}

.rmm-field input[type="text"],
.rmm-field input[type="email"],
.rmm-field input[type="tel"],
.rmm-field input[type="number"],
.rmm-field input[type="url"],
.rmm-field select,
.rmm-field textarea {
    padding: 0.625rem 0.75rem;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    background: #fff;
    width: 100%;
}

.rmm-field input:focus,
.rmm-field select:focus,
.rmm-field textarea:focus {
    border-color: #2c5f3d;
    outline: 2px solid rgba(44, 95, 61, 0.2);
    outline-offset: -1px;
}

.rmm-field textarea {
    resize: vertical;
    min-height: 80px;
}

.rmm-field-help {
    margin: 0;
    font-size: 0.8125rem;
    color: #777;
}

.rmm-field-error {
    margin: 0;
    font-size: 0.8125rem;
    color: #d63638;
    min-height: 0;
}

.rmm-field-error:not(:empty) {
    margin-top: 0.25rem;
}

.rmm-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.rmm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f6f7f7;
    border-radius: 6px;
    cursor: pointer;
    font-weight: normal !important;
}

.rmm-checkbox-item:hover {
    background: #e8f0e9;
}

.rmm-field-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-weight: normal;
    cursor: pointer;
}

.rmm-field-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.rmm-field-checkbox span {
    font-size: 0.9375rem;
    color: #50575e;
    line-height: 1.5;
}

/* Image upload */
.rmm-field-images {
    display: block;
}

.rmm-images-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem 1rem;
    background: #f6f7f7;
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.rmm-images-label:hover {
    background: #e8f0e9;
    border-color: #2c5f3d;
}

.rmm-images-icon {
    font-size: 2rem;
}

.rmm-images-text {
    color: #50575e;
    font-size: 0.9375rem;
}

.rmm-field-images input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.rmm-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rmm-image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f6f7f7;
}

.rmm-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rmm-image-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(214, 54, 56, 0.95);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* Honeypot — hidden from users, visible to bots */
.rmm-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Form messages & submit */
.rmm-form-messages {
    margin: 1rem 0;
}

.rmm-form-messages:empty {
    margin: 0;
}

.rmm-message {
    padding: 0.875rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.rmm-message-success {
    background: #d8eedb;
    color: #1c5b2b;
    border-left: 4px solid #2c5f3d;
}

.rmm-message-error {
    background: #fcebea;
    color: #8a1f1f;
    border-left: 4px solid #d63638;
}

.rmm-form-actions {
    margin-top: 1.5rem;
}

.rmm-submit-btn {
    padding: 0.875rem 2rem;
    background: #2c5f3d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.rmm-submit-btn:hover {
    background: #1f4a2e;
}

.rmm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Single template ===== */
.rmm-breadcrumb {
    margin-bottom: 1rem;
}

.rmm-breadcrumb a {
    color: #50575e;
    text-decoration: none;
    font-size: 0.9375rem;
}

.rmm-breadcrumb a:hover {
    color: #2c5f3d;
}

.rmm-single-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rmm-single-title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: #1d2327;
    line-height: 1.2;
}

.rmm-single-location {
    margin: 0;
    color: #50575e;
    font-size: 1rem;
}

.rmm-single-price {
    text-align: right;
}

.rmm-price-label {
    display: block;
    font-size: 0.875rem;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rmm-price-value {
    display: block;
    font-size: 1.875rem;
    font-weight: 700;
    color: #2c5f3d;
}

.rmm-gallery {
    margin-bottom: 2rem;
}

.rmm-gallery-main {
    aspect-ratio: 16 / 9;
    background: #f0f0f1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.rmm-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmm-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rmm-gallery-thumb {
    width: 80px;
    height: 60px;
    padding: 0;
    background: #f0f0f1;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.rmm-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rmm-gallery-thumb:hover {
    transform: scale(1.05);
}

.rmm-gallery-thumb.is-active {
    border-color: #2c5f3d;
}

.rmm-single-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

@media (max-width: 768px) {
    .rmm-single-grid {
        grid-template-columns: 1fr;
    }
}

.rmm-section-block {
    margin-bottom: 2rem;
}

.rmm-section-block h2 {
    margin: 0 0 1rem;
    font-size: 1.375rem;
    color: #2c5f3d;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f0e9;
}

.rmm-spec-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
}

.rmm-spec-list > div {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: #f6f7f7;
    border-radius: 6px;
}

.rmm-spec-list dt {
    font-size: 0.8125rem;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.rmm-spec-list dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1d2327;
}

.rmm-amenity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.rmm-amenity-list li {
    padding: 0.5rem 0.875rem;
    background: #e8f0e9;
    color: #1f4a2e;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.rmm-story {
    font-size: 1rem;
    line-height: 1.7;
    color: #1d2327;
}

.rmm-story p {
    margin: 0 0 1rem;
}

.rmm-map iframe {
    display: block;
}

.rmm-map-link {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
}

.rmm-map-link a {
    color: #2c5f3d;
}

/* Sidebar */
.rmm-contact-box,
.rmm-event-info {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.rmm-contact-box h3,
.rmm-event-info h3 {
    margin: 0 0 0.75rem;
    color: #2c5f3d;
    font-size: 1.125rem;
}

.rmm-contact-help {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #50575e;
    line-height: 1.5;
}

.rmm-contact-form .rmm-field {
    margin-bottom: 0.875rem;
}

.rmm-event-info p {
    margin: 0 0 0.5rem;
    font-size: 0.9375rem;
    color: #50575e;
}

.rmm-event-info p:first-of-type {
    font-weight: 600;
    color: #1d2327;
}

/* Body lock when modal is open */
body.rmm-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 600px) {
    .rmm-header {
        padding: 1.5rem;
    }
    .rmm-header-title {
        font-size: 1.5rem;
    }
    .rmm-single-title {
        font-size: 1.5rem;
    }
    .rmm-single-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .rmm-single-price {
        text-align: left;
    }
    .rmm-modal {
        padding: 0.5rem;
    }
    .rmm-modal-content {
        padding: 1.5rem 1.25rem 2rem;
    }
}
