/* ============================================================
   Memory Wall Plugin — Public Styles
   ============================================================ */

/* ---- Reset / Container ---- */
.mw-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Wall Header ---- */
.mw-wall-wrapper { padding: 20px 0; }

.mw-wall-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px 30px;
    background: linear-gradient(135deg, #fff5f8 0%, #f0f4ff 100%);
    border-radius: 16px;
}

.mw-wall-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.mw-wall-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 500px;
    margin: 0 auto 16px;
}

.mw-reveal-announce {
    display: inline-block;
    background: #ff5a7a;
    color: #fff;
    border-radius: 20px;
    padding: 6px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

/* ---- Grid ---- */
.mw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* ---- Card ---- */
.mw-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.mw-card:hover,
.mw-card:focus {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.mw-card:active { transform: scale(0.98); }

.mw-card-image {
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.mw-card-no-image { font-size: 2.5rem; color: #ddd; }

.mw-card-body { padding: 14px 16px 18px; }

.mw-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.mw-card-message {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Featured card */
.mw-featured { margin-bottom: 30px; }

.mw-featured .mw-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 700px;
    margin: 0 auto;
    border: 2px solid #ff5a7a;
}

.mw-featured .mw-card-image { height: 240px; }

.mw-featured .mw-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mw-featured .mw-card-name { font-size: 1.3rem; }
.mw-featured .mw-card-message { font-size: 1rem; }

/* ---- Locked / Draft state ---- */
.mw-locked {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.mw-locked-icon { font-size: 3rem; margin-bottom: 16px; }
.mw-locked h2   { font-size: 1.6rem; color: #333; margin: 0 0 8px; }
.mw-locked p    { font-size: 1rem; margin: 0 0 30px; }

/* Skeleton cards in locked state */
.mw-card-skeletons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
    filter: blur(4px);
    pointer-events: none;
}

.mw-skeleton {
    height: 220px;
    border-radius: 14px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: mw-shimmer 1.4s infinite;
}

@keyframes mw-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ---- Empty state ---- */
.mw-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.mw-empty h3 { font-size: 1.4rem; color: #444; }

/* ---- Modal ---- */
.mw-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mw-fade-in 0.2s ease;
}

.mw-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.mw-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: mw-slide-up 0.25s ease;
}

.mw-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0;
}

.mw-modal-close:hover { color: #333; }

#mw-modal-body img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 18px;
    object-fit: cover;
    max-height: 320px;
}

#mw-modal-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a2e;
}

#mw-modal-body p {
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
    margin: 0;
}

@keyframes mw-fade-in  { from { opacity: 0; }       to { opacity: 1; } }
@keyframes mw-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Submission Form ---- */
.mw-form-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    max-width: 600px;
    margin: 0 auto;
}

.mw-form-title    { font-size: 1.8rem; font-weight: 800; color: #1a1a2e; margin: 0 0 6px; }
.mw-form-subtitle { color: #777; margin: 0 0 28px; }

.mw-form-group    { margin-bottom: 22px; }

.mw-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 6px;
}

.mw-required { color: #ff5a7a; }
.mw-optional { color: #999; font-weight: 400; }

.mw-form input[type="text"],
.mw-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;        /* prevents iOS zoom */
    color: #333;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s;
    font-family: inherit;
}

.mw-form input[type="text"]:focus,
.mw-form textarea:focus {
    outline: none;
    border-color: #ff5a7a;
    background: #fff;
}

.mw-form textarea { resize: vertical; min-height: 110px; }

.mw-char-count {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 4px;
}

.mw-field-error {
    display: none;
    color: #e44;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* File drop zone */
.mw-file-drop {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    background: #fafafa;
}

.mw-file-drop:hover,
.mw-file-drop.has-image { border-color: #ff5a7a; background: #fff5f7; }

.mw-file-drop input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.mw-file-drop-label { pointer-events: none; }
.mw-file-icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }

.mw-file-drop-label span  { display: block; font-size: 0.9rem; color: #555; }
.mw-file-drop-label small { color: #aaa; font-size: 0.78rem; }

.mw-file-preview {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.mw-file-preview img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.mw-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff5a7a;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Submit button */
.mw-button {
    display: inline-block;
    background: #ff5a7a;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.mw-button:hover   { background: #e04468; }
.mw-button:active  { transform: scale(0.98); }
.mw-button:disabled { background: #ccc; cursor: not-allowed; }

/* Status messages */
.mw-status-msg {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
}

.mw-status-success { background: #e6f9ef; color: #1e7e45; border: 1px solid #b2dfca; }
.mw-status-error   { background: #fde8ec; color: #c0392b; border: 1px solid #f5c0c8; }

/* Notice */
.mw-notice { text-align: center; padding: 30px; color: #777; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .mw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .mw-featured .mw-card { grid-template-columns: 1fr; }
    .mw-featured .mw-card-image { height: 200px; }
    .mw-wall-title { font-size: 1.6rem; }
    .mw-form-wrapper { padding: 24px 20px; }
}

@media (max-width: 480px) {
    .mw-grid { grid-template-columns: 1fr; }
    .mw-card-image { height: 220px; }
    .mw-modal-content { padding: 24px 18px; }
}
