/**
 * Flamenet Answers — Frontend Styles
 * Matches Flamenet design system.
 */

/* -------------------------------------------------------
   Wrapper
------------------------------------------------------- */
.fna-wrap {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #000000;
    line-height: 1.4;
}

/* -------------------------------------------------------
   Search bar
------------------------------------------------------- */
.fna-search-bar {
    background: #E8EEF8;
    border: 1px solid #7F9DB9;
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.fna-search-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 200px;
}

.fna-search-input {
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #7F9DB9;
    padding: 2px 4px;
    flex: 1;
    max-width: 300px;
}

.fna-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* -------------------------------------------------------
   Two-column layout
------------------------------------------------------- */
.fna-layout {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.fna-cat-nav {
    width: 160px;
    flex-shrink: 0;
}

.fna-main {
    flex: 1;
    min-width: 0;
}

/* -------------------------------------------------------
   Category nav
------------------------------------------------------- */
.fna-cat-nav-title {
    background: #003399;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    margin-bottom: 0;
}

.fna-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #7F9DB9;
    border-top: none;
}

.fna-cat-list li {
    border-bottom: 1px solid #DDDDDD;
}

.fna-cat-list li:last-child {
    border-bottom: none;
}

.fna-cat-list li a {
    display: block;
    padding: 4px 8px;
    color: #0000CC;
    text-decoration: none;
    font-size: 11px;
}

.fna-cat-list li a:visited {
    color: #003399;
}

.fna-cat-list li a:hover {
    background: #EEF2FF;
    text-decoration: underline;
}

.fna-cat-active,
.fna-cat-active:visited,
.fna-cat-active:hover,
.fna-cat-active:visited:hover {
    background: #003399 !important;
    color: #FFFFFF !important;
    text-decoration: none;
}

.fna-cat-active {
    font-weight: bold;
}

.fna-cat-count {
    color: #666666;
    font-size: 10px;
}

.fna-cat-active .fna-cat-count {
    color: #CCDDFF;
}

/* -------------------------------------------------------
   Questions table
------------------------------------------------------- */
.fna-q-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    border: 1px solid #7F9DB9;
}

.fna-q-table thead th {
    background: #003399;
    color: #FFFFFF;
    padding: 4px 8px;
    text-align: left;
    font-weight: bold;
    font-size: 11px;
    border-right: 1px solid #2244AA;
    white-space: nowrap;
}

.fna-q-table thead th:last-child {
    border-right: none;
}

.fna-q-table tbody tr:nth-child(even) {
    background: #EEF2FF;
}

.fna-q-table tbody tr:hover {
    background: #D8E4F8;
}

.fna-q-table tbody td {
    padding: 4px 8px;
    border-right: 1px solid #DDDDDD;
    vertical-align: top;
}

.fna-q-table tbody td:last-child {
    border-right: none;
}

.fna-q-table a {
    color: #0000CC;
    text-decoration: none;
}

.fna-q-table a:visited {
    color: #003399;
}

.fna-q-table a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Answer count badge
------------------------------------------------------- */
.fna-ans-count {
    display: inline-block;
    background: #006600;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 2px;
    min-width: 18px;
    text-align: center;
}

/* -------------------------------------------------------
   Status badges
------------------------------------------------------- */
.fna-status-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fna-status-open {
    background: #E8FFE8;
    color: #006600;
    border: 1px solid #009900;
}

.fna-status-resolved {
    background: #FFF8E0;
    color: #AA6600;
    border: 1px solid #FFCC00;
}

.fna-status-closed {
    background: #F0F0F0;
    color: #666666;
    border: 1px solid #999999;
}

/* -------------------------------------------------------
   Question header
------------------------------------------------------- */
.fna-question-header {
    background: #003399;
    color: #FFFFFF;
    padding: 8px 10px;
    margin-bottom: 0;
}

.fna-question-header h2 {
    font-size: 14px;
    font-weight: bold;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.fna-q-meta {
    font-size: 10px;
    color: #BBCCEE;
    line-height: 1.5;
}

.fna-q-meta strong {
    color: #FFFFFF;
}

.fna-cat-link-light {
    color: #FFCC00;
    text-decoration: none;
}

.fna-cat-link-light:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Question body
------------------------------------------------------- */
.fna-question-body {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-top: none;
    padding: 10px;
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.fna-question-body p {
    margin: 0 0 8px 0;
}

.fna-question-body p:last-child {
    margin-bottom: 0;
}

/* -------------------------------------------------------
   Best answer box
------------------------------------------------------- */
.fna-best-answer {
    background: #FFFDE0;
    border: 2px solid #FFCC00;
    padding: 10px;
    margin-bottom: 12px;
}

.fna-best-label {
    font-size: 11px;
    font-weight: bold;
    color: #006600;
    margin-bottom: 6px;
}

/* -------------------------------------------------------
   Answers heading
------------------------------------------------------- */
.fna-answers-heading {
    font-size: 12px;
    font-weight: bold;
    color: #003399;
    margin: 12px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #003399;
}

/* -------------------------------------------------------
   Individual answer
------------------------------------------------------- */
.fna-answer {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    padding: 8px 10px;
    margin-bottom: 6px;
    position: relative;
}

.fna-answer-mine {
    background: #FFFFF8;
    border-color: #AACCAA;
}

.fna-best-ribbon {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 10px;
    font-weight: bold;
    color: #006600;
}

.fna-answer-meta {
    font-size: 10px;
    color: #666666;
    margin-bottom: 4px;
    line-height: 1.5;
}

.fna-ans-author {
    color: #003399;
    font-weight: bold;
}

.fna-answer-body {
    font-size: 11px;
    line-height: 1.5;
    margin: 4px 0 6px 0;
}

.fna-answer-body p {
    margin: 0 0 6px 0;
}

.fna-answer-body p:last-child {
    margin-bottom: 0;
}

/* -------------------------------------------------------
   Vote row
------------------------------------------------------- */
.fna-vote-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    flex-wrap: wrap;
}

.fna-vote-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.fna-vote-btn {
    font-size: 10px;
    padding: 1px 6px;
    border: 1px solid #AAAAAA;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
    vertical-align: middle;
}

.fna-vote-up {
    background: #003399;
    color: #FFFFFF;
    border-color: #001177;
}

.fna-vote-up:hover {
    background: #0044CC;
}

.fna-vote-dn {
    background: #EEEEEE;
    color: #555555;
    border-color: #AAAAAA;
}

.fna-vote-dn:hover {
    background: #DDDDDD;
}

.fna-voted {
    outline: 2px solid #FFCC00;
}

.fna-vote-disabled {
    background: #F5F5F5;
    color: #BBBBBB;
    border-color: #DDDDDD;
    cursor: default;
    display: inline-block;
}

.fna-vote-score {
    font-weight: bold;
    color: #003399;
    min-width: 28px;
    text-align: center;
    display: inline-block;
    font-size: 11px;
}

.fna-best-btn {
    background: #FFCC00;
    color: #000000;
    font-size: 10px;
    padding: 1px 8px;
    border: 1px solid #CC9900;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    margin-left: 8px;
}

.fna-best-btn:hover {
    background: #FFD700;
}

/* -------------------------------------------------------
   Answer form / Ask form (shared pattern)
------------------------------------------------------- */
.fna-answer-form {
    margin-top: 16px;
    border: 1px solid #7F9DB9;
}

.fna-apply-header {
    background: #003399;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
}

.fna-apply-body {
    background: #FFFFFF;
    padding: 12px 10px;
}

/* -------------------------------------------------------
   Form fields
------------------------------------------------------- */
.fna-field-row {
    margin-bottom: 10px;
}

.fna-field-row label {
    display: block;
    font-size: 11px;
    font-weight: bold;
    color: #003399;
    margin-bottom: 3px;
}

.fna-field-row input[type="text"],
.fna-field-row input[type="email"],
.fna-field-row select,
.fna-field-row textarea {
    width: 100%;
    max-width: 500px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    border: 1px solid #7F9DB9;
    padding: 3px 5px;
    box-sizing: border-box;
}

.fna-field-row textarea {
    resize: vertical;
}

.fna-req {
    color: #CC0000;
}

/* -------------------------------------------------------
   Buttons & links
------------------------------------------------------- */
.fna-btn,
.fna-btn:visited,
.fna-btn:hover,
.fna-btn:visited:hover {
    color: #FFFFFF;
    text-decoration: none;
}

.fna-btn {
    display: inline-block;
    background: #003399;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    padding: 3px 12px;
    border: 1px solid #001177;
    cursor: pointer;
    vertical-align: middle;
    white-space: nowrap;
}

.fna-btn:hover,
.fna-btn:visited:hover {
    background: #0044CC;
}

.fna-cancel {
    color: #0000CC;
    font-size: 11px;
    text-decoration: none;
    margin-left: 8px;
}

.fna-cancel:visited {
    color: #003399;
}

.fna-cancel:hover {
    text-decoration: underline;
}

.fna-back-link {
    font-size: 11px;
    margin-bottom: 8px;
}

.fna-back-link a {
    color: #0000CC;
    text-decoration: none;
}

.fna-back-link a:visited {
    color: #ffffff;
}

.fna-back-link a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Category link (in table)
------------------------------------------------------- */
.fna-cat-link {
    color: #0000CC;
    text-decoration: none;
    font-size: 10px;
}

.fna-cat-link:visited {
    color: #ffffff;
}

.fna-cat-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   View title
------------------------------------------------------- */
.fna-view-title {
    font-size: 13px;
    font-weight: bold;
    color: #003399;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #7F9DB9;
    padding-bottom: 4px;
}

/* -------------------------------------------------------
   Flash notices
------------------------------------------------------- */
.fna-notice-success {
    background: #E8FFE8;
    border: 1px solid #009900;
    color: #006600;
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 10px;
    font-weight: bold;
}

.fna-notice-error {
    background: #FFE8E8;
    border: 1px solid #CC0000;
    color: #CC0000;
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 10px;
    font-weight: bold;
}

.fna-notice-info {
    background: #FFFDE0;
    border: 1px solid #FFCC00;
    color: #664400;
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 10px;
}

/* -------------------------------------------------------
   Empty state
------------------------------------------------------- */
.fna-empty {
    color: #666666;
    font-style: italic;
    font-size: 11px;
    padding: 10px 0;
}

.fna-empty a {
    color: #0000CC;
    text-decoration: none;
}

.fna-empty a:hover {
    text-decoration: underline;
}

.fna-closed-notice {
    background: #F5F5F5;
    border: 1px solid #CCCCCC;
    padding: 8px 10px;
    font-style: normal;
}

/* -------------------------------------------------------
   Login prompt
------------------------------------------------------- */
.fna-login-prompt {
    font-size: 11px;
    color: #555555;
    padding: 8px 0;
}

.fna-login-prompt a {
    color: #0000CC;
    text-decoration: none;
    font-weight: bold;
}

.fna-login-prompt a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Filter notice
------------------------------------------------------- */
.fna-filter-notice {
    font-size: 11px;
    color: #555555;
    margin-bottom: 8px;
}

.fna-filter-notice a {
    color: #CC0000;
    text-decoration: none;
}

.fna-filter-notice a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Pagination
------------------------------------------------------- */
.fna-pagination {
    margin-top: 10px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.fna-page-link {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #7F9DB9;
    color: #0000CC;
    text-decoration: none;
    font-size: 11px;
    background: #FFFFFF;
}

.fna-page-link:visited {
    color: #ffffff;
}

.fna-page-link:hover {
    background: #EEF2FF;
    text-decoration: none;
}

.fna-page-cur {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #003399;
    background: #003399;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: bold;
}

/* -------------------------------------------------------
   Messaging integration
------------------------------------------------------- */
.fna-contact-asker {
    margin: 8px 0 10px 0;
    padding: 6px 0;
    border-top: 1px solid #CCCCCC;
}

.fna-btn-msg,
.fna-btn-msg:visited,
.fna-btn-msg:hover,
.fna-btn-msg:visited:hover {
    color: #fff;
    text-decoration: none;
}

.fna-btn-msg {
    display: inline-block;
    background: #336699;
    border: 1px solid #224477;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 10px;
    cursor: pointer;
}

.fna-btn-msg:hover,
.fna-btn-msg:visited:hover {
    background: #224477;
}

.fna-btn-msg-sm {
    font-size: 10px;
    padding: 1px 6px;
    margin-left: 8px;
}

/* -------------------------------------------------------
   Responsive
------------------------------------------------------- */
@media (max-width: 600px) {
    .fna-layout {
        flex-direction: column;
    }

    .fna-cat-nav {
        display: none;
    }

    .fna-q-table thead th:nth-child(4),
    .fna-q-table tbody td:nth-child(4),
    .fna-q-table thead th:nth-child(5),
    .fna-q-table tbody td:nth-child(5) {
        display: none;
    }

    .fna-question-header h2 {
        font-size: 12px;
    }

    .fna-vote-row {
        flex-wrap: wrap;
    }

    .fna-search-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .fna-field-row input[type="text"],
    .fna-field-row textarea,
    .fna-field-row select {
        max-width: 100%;
    }
}
