/* DYDY Forum Frontend Styles */

#dydy-forum-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.45;
}

#dydy-forum-container h1 {
    color: #1f2937;
    margin: 0 0 8px 0;
    font-size: 22px;
}

.forum-description {
    color: #6b7280;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.dydy-forum-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 8px 10px;
    margin: 10px 0;
}

.dydy-inline-login-form {
    max-width: 360px;
}

.dydy-inline-login-form p {
    margin: 0 0 10px;
}

.dydy-inline-login-field {
    margin: 0 0 10px;
}

.dydy-inline-login-form label {
    display: block;
    margin-bottom: 4px;
    color: #374151;
    width: 100%;
}

.dydy-inline-login-form input[type="text"],
.dydy-inline-login-form input[type="password"] {
    display: block;
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px;
    box-sizing: border-box;
}

.dydy-inline-login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.dydy-forum-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
}

.dydy-forum-switcher {
    display: flex;
    gap: 6px;
}

.switch-link {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
    background: #fff;
}

.switch-link.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

/* Topics List */
.dydy-forum-topics-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px 0;
}

.dydy-forum-topic-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dydy-forum-topic-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.12);
}

.topic-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.topic-state {
    color: #1e40af;
    font-size: 12px;
}

.topic-desc {
    color: #374151;
    margin: 6px 0 8px;
}

.topic-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
    flex-wrap: wrap;
}

.topic-meta-main-line,
.topic-meta-stats-line {
    width: 100%;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.topic-meta-translators {
    display: block;
}

.topic-meta-translators .topic-meta-main-line,
.topic-meta-translators .topic-meta-translation-line,
.topic-meta-translators .topic-meta-stats-line {
    display: block;
    width: 100%;
    flex-basis: 100%;
}

.topic-meta-translators .topic-meta-main-line,
.topic-meta-translators .topic-meta-translation-line {
    margin-bottom: 2px;
}

.topic-meta-translators .topic-meta-stats-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dydy-forum-topic-details {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.dydy-forum-topic-details h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.topic-meta-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
}

.topic-content-text {
    color: #1f2937;
}

.dydy-forum-replies h3,
.dydy-forum-reply-form h3,
.dydy-forum-new-topic h2 {
    margin: 10px 0 8px;
    font-size: 18px;
}

.reply-list {
    display: grid;
    gap: 8px;
}

.reply-item {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 8px 10px;
}

.reply-meta {
    color: #6b7280;
    font-size: 12px;
}

.reply-attachments {
    margin-top: 6px;
    font-size: 12px;
}

.reply-attachments ul {
    margin: 4px 0 0 16px;
    padding: 0;
}

.reply-attachments li {
    margin: 2px 0;
}

.dydy-forum-reply-form textarea,
.dydy-forum-new-topic textarea,
.dydy-forum-new-topic input[type="text"] {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.compact-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 7px 11px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}
