/* * Community Stories - Memory Wall Style */

:root {
    --mha-primary: #34453c;
    --mha-dark: #212529;
    --mha-light: #f8f9fa;
    --mha-border: #dee2e6;
}

/* --- 1. The Container (The Wall) --- */
.mha-stories-section {
    background-color: var(--mha-light);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    border: 1px solid var(--mha-border);
}

.mha-stories-header {
    margin-bottom: 25px;
    text-align: right;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.mha-stories-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mha-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mha-stories-count {
    background: var(--mha-primary);
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 10px;
    border-radius: 50px;
}

.mha-stories-header p {
    color: #6c757d;
    font-size: 0.95rem;
}

/* --- 2. The Form Area --- */
.mha-story-form-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 40px;
    border: 1px solid rgba(0,0,0,0.02);
}

.mha-form-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--mha-dark);
}

/* Tabs */
.mha-form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.mha-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    color: #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mha-tab-btn:hover { background: #f8f9fa; color: var(--mha-primary); }
.mha-tab-btn.active {
    background: #e7f1ff;
    color: var(--mha-primary);
}

/* Inputs */
.mha-input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.mha-pill-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 50px; /* Pill Shape */
    background: #f8f9fa;
}

.mha-pill-input:focus {
    background: #fff;
    border-color: var(--mha-primary);
    outline: none;
}

.mha-story-textarea {
    width: 100%;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    min-height: 100px;
    font-family: inherit;
    resize: vertical;
}

.mha-story-textarea:focus {
    background: #fff;
    border-color: var(--mha-primary);
    outline: none;
}

/* Recorder UI */
.mha-recorder-ui {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px dashed #ccc;
    margin-bottom: 15px;
}

.record-btn {
    width: 220px;
    height: 60px;
    border-radius: 70px;
    border: 4px solid #e9ecef;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    transition: transform 0.1s;
}

.record-btn:active { transform: scale(0.95); }
.record-icon {
    width: 20px; height: 20px;
    background: #dc3545;
    border-radius: 50%;
}
.record-btn.recording { border-color: #dc3545; }
.record-btn.recording .record-icon { border-radius: 4px; } /* Square stop icon */

#mha-timer { font-family: monospace; font-size: 1.2rem; font-weight: bold; }

/* Submit Button */
.mha-story-submit-btn {
    background: var(--mha-primary);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 15px;
}

/* --- 3. The Memory Card --- */
.mha-story-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    gap: 15px;
    direction: rtl;
}

/* Avatar Area */
.mha-story-avatar { flex-shrink: 0; }
.mha-avatar-circle {
    width: 45px; height: 45px;
    background-color: #e9ecef;
    color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Content Area */
.mha-story-body { flex-grow: 1; }
.mha-story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.mha-story-author {
    font-weight: 700;
    color: var(--mha-dark);
}
.mha-story-date {
    font-size: 0.75rem;
    color: #adb5bd;
    display: flex; align-items: center; gap: 4px;
}
.mha-story-text {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Audio Player in Card */
.mha-audio-player-wrapper {
    background: #f1f3f5;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}




/* --- SUCCESS BANNER --- */
.mha-success-banner {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

.mha-success-icon {
    font-size: 1.5rem;
    color: #198754;
    padding-top: 2px;
}

.mha-success-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.mha-success-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.mha-close-banner {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #0f5132;
    opacity: 0.5;
    cursor: pointer;
    margin-right: auto; /* Pushes X to far left in RTL */
    padding: 0;
}

.mha-close-banner:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}



/* Utility Class for Hiding */
.mha-hidden {
    display: none !important;
}

/* Ensure banner layout is flex when visible */
.mha-success-banner {
    display: flex; 
    /* ... rest of your existing banner styles ... */
}





/* --- Cookies Consent Checkbox --- */
.mha-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #6c757d;
    padding-right: 5px; /* RTL spacing */
}

.mha-cookies-consent input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--mha-primary); /* Uses your blue color */
}

.mha-cookies-consent label {
    cursor: pointer;
    user-select: none;
}




/* Mobile Responsiveness */
@media (max-width: 768px) {
    .mha-stories-section { padding: 20px 15px; }
    .mha-input-row { flex-direction: column; gap: 10px; }
    .mha-story-card { flex-direction: column; gap: 10px; }
    .mha-story-avatar { display: flex; align-items: center; gap: 10px; }
    .mha-story-meta { flex-direction: row; }
}
