/* ============================================
   AAKANSHA PORTAL — Comment Section Styles
   Works on both light and dark themed pages
   ============================================ */

.cm-root {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

.cm-section {
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    padding-top: 3rem;
}

.cm-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-style: italic;
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* ---- Emoji Row ---- */
.cm-emoji-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cm-emoji-btn {
    font-size: 1.5rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.cm-emoji-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}

.cm-emoji-btn.active {
    opacity: 1;
    transform: scale(1.2);
}

/* ---- Textarea ---- */
.cm-textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    display: block;
    margin-bottom: 1rem;
}

/* ---- Submit ---- */
.cm-submit {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cm-submit:hover:not(:disabled) {
    transform: translateY(-2px);
}

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

/* ---- Status ---- */
.cm-status {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

/* ---- Comments List ---- */
.cm-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cm-empty {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.5;
}

.cm-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 12px;
    animation: cmFadeIn 0.4s ease;
}

@keyframes cmFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cm-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.cm-body {
    flex: 1;
}

.cm-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.3rem;
    word-break: break-word;
}

.cm-time {
    font-size: 0.75rem;
    opacity: 0.45;
    display: block;
}

/* ====================================================
   LIGHT THEME (morning-wish)
   ==================================================== */
.cm-theme-light .cm-title          { color: #4a4a4a; }
.cm-theme-light .cm-emoji-btn.active { border-color: #e5989b; background: rgba(229,152,155,0.1); }
.cm-theme-light .cm-textarea       { background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.1); color: #2d3748; }
.cm-theme-light .cm-textarea:focus { border-color: #e5989b; box-shadow: 0 0 0 3px rgba(229,152,155,0.15); }
.cm-theme-light .cm-submit         { background: #e5989b; color: white; box-shadow: 0 4px 12px rgba(229,152,155,0.35); }
.cm-theme-light .cm-submit:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(229,152,155,0.5); }
.cm-theme-light .cm-status         { color: #e5989b; }
.cm-theme-light .cm-empty          { color: #9a8fa8; }
.cm-theme-light .cm-item           { background: rgba(255,255,255,0.7); border: 1px solid rgba(0,0,0,0.06); }
.cm-theme-light .cm-text           { color: #4a4a4a; }
.cm-theme-light .cm-success        { color: #48bb78; }
.cm-theme-light .cm-error          { color: #e53e3e; }

/* ====================================================
   DAWN THEME (thank-you-chance)
   ==================================================== */
.cm-theme-dawn .cm-section         { border-top-color: rgba(201,132,138,0.25); }
.cm-theme-dawn .cm-title           { color: #2b6cb0; }
.cm-theme-dawn .cm-emoji-btn.active { border-color: #ed8936; background: rgba(237,137,54,0.08); }
.cm-theme-dawn .cm-textarea        { background: rgba(255,255,255,0.85); border: 1px solid rgba(0,0,0,0.1); color: #2d3748; }
.cm-theme-dawn .cm-textarea:focus  { border-color: #ed8936; box-shadow: 0 0 0 3px rgba(237,137,54,0.12); }
.cm-theme-dawn .cm-submit          { background: linear-gradient(135deg, #ed8936, #e5989b); color: white; box-shadow: 0 4px 12px rgba(229,152,155,0.3); }
.cm-theme-dawn .cm-submit:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(229,152,155,0.5); }
.cm-theme-dawn .cm-status          { color: #ed8936; }
.cm-theme-dawn .cm-empty           { color: #9a8fa8; }
.cm-theme-dawn .cm-item            { background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.5); }
.cm-theme-dawn .cm-text            { color: #4a5568; }
.cm-theme-dawn .cm-success         { color: #48bb78; }
.cm-theme-dawn .cm-error           { color: #e53e3e; }

/* ====================================================
   DARK THEME (gallery)
   ==================================================== */
.cm-theme-dark .cm-section         { border-top-color: rgba(255,255,255,0.08); }
.cm-theme-dark .cm-title           { color: rgba(255,255,255,0.9); }
.cm-theme-dark .cm-emoji-btn.active { border-color: #c9848a; background: rgba(201,132,138,0.15); }
.cm-theme-dark .cm-textarea        { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
.cm-theme-dark .cm-textarea:focus  { border-color: #c9848a; box-shadow: 0 0 0 3px rgba(201,132,138,0.15); }
.cm-theme-dark .cm-textarea::placeholder { color: rgba(255,255,255,0.3); }
.cm-theme-dark .cm-submit          { background: rgba(201,132,138,0.8); color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.cm-theme-dark .cm-submit:hover:not(:disabled) { background: #c9848a; box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.cm-theme-dark .cm-status          { color: #c9848a; }
.cm-theme-dark .cm-empty           { color: rgba(255,255,255,0.35); }
.cm-theme-dark .cm-item            { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); }
.cm-theme-dark .cm-text            { color: rgba(255,255,255,0.75); }
.cm-theme-dark .cm-time            { color: rgba(255,255,255,0.3) !important; opacity: 1 !important; }
.cm-theme-dark .cm-success         { color: #68d391; }
.cm-theme-dark .cm-error           { color: #fc8181; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .cm-root { padding: 0 1rem 3rem; }
    .cm-title { font-size: 1.3rem; }
    .cm-emoji-btn { width: 42px; height: 42px; font-size: 1.3rem; }
}
