/**
 * Flamenet Listings — Stylesheet
 * eBay-style marketplace, Flamenet theme
 */

/* -------------------------------------------------------
   Container
------------------------------------------------------- */
.fnl-listings {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #000;
}

/* -------------------------------------------------------
   Flash Messages
------------------------------------------------------- */
.fnl-msg-ok,
.fnl-msg-err,
.fnl-msg-info {
    padding: 6px 10px;
    margin-bottom: 10px;
    border: 1px solid;
    font-size: 12px;
}

.fnl-msg-ok {
    background: #EEFFEE;
    border-color: #006600;
    color: #006600;
}

.fnl-msg-err {
    background: #FFEEEE;
    border-color: #CC0000;
    color: #CC0000;
}

.fnl-msg-info {
    background: #EEF3FF;
    border-color: #003399;
    color: #003399;
}

/* -------------------------------------------------------
   Section Headers (same pattern as forum/events)
------------------------------------------------------- */
.fnl-section-header {
    background: #003399;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    margin: 0 0 8px 0;
}

.fnl-section-header a {
    color: #FFCC00;
    text-decoration: none;
    font-weight: normal;
    font-size: 11px;
}

.fnl-section-header a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Search Bar
------------------------------------------------------- */
.fnl-search-bar {
    margin-bottom: 10px;
}

.fnl-search-bar form {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.fnl-search-bar input[type="text"],
.fnl-search-bar input[type="search"] {
    font-size: 12px;
    padding: 3px 5px;
    border: 1px solid #999;
    flex: 1;
    min-width: 160px;
}

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

.fnl-btn-search {
    font-size: 12px;
    padding: 3px 10px;
    background: #003399;
    border: 1px solid #002277;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.fnl-btn-search:hover,
.fnl-btn-search:visited:hover {
    background: #0044BB;
}

/* -------------------------------------------------------
   Category Tabs
------------------------------------------------------- */
.fnl-cat-tabs {
    list-style: none;
    margin: 0 0 10px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #003399;
}

.fnl-cat-tabs li {
    margin: 0;
}

.fnl-cat-tabs li a {
    display: block;
    padding: 3px 8px;
    font-size: 11px;
    color: #003399;
    text-decoration: none;
    background: #EEF2FF;
    border: 1px solid #AABBD4;
    border-bottom: none;
    margin-right: 2px;
}

.fnl-cat-tabs li a:hover {
    background: #D0DEFF;
}

.fnl-cat-tabs li.fnl-tab-active a,
.fnl-cat-tabs li.fnl-tab-active a:visited,
.fnl-cat-tabs li.fnl-tab-active a:hover,
.fnl-cat-tabs li.fnl-tab-active a:visited:hover {
    color: #fff;
    text-decoration: none;
}

.fnl-cat-tabs li.fnl-tab-active a {
    background: #003399;
    border-color: #003399;
}

/* -------------------------------------------------------
   Listings Table
------------------------------------------------------- */
.fnl-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 12px;
}

.fnl-table th {
    background: #CCCCDD;
    color: #003399;
    font-weight: bold;
    padding: 4px 6px;
    text-align: left;
    border: 1px solid #AABBD4;
    white-space: nowrap;
}

.fnl-table td {
    padding: 4px 6px;
    border: 1px solid #DDD;
    vertical-align: middle;
}

.fnl-table tr:nth-child(even) td {
    background: #F5F5FA;
}

.fnl-table tr:hover td {
    background: #EEF2FF;
}

/* Thumbnail column */
.fnl-thumb-col {
    width: 58px;
    text-align: center;
}

.fnl-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid #CCC;
    display: block;
}

.fnl-thumb-placeholder {
    width: 50px;
    height: 50px;
    background: #EEEEEE;
    border: 1px solid #CCC;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    text-align: center;
}

/* Item link */
.fnl-item-link {
    color: #003399;
    font-weight: bold;
    text-decoration: none;
}

.fnl-item-link:hover {
    color: #CC0000;
    text-decoration: underline;
}

.fnl-item-meta {
    color: #666;
    font-size: 11px;
    margin-top: 2px;
}

/* Price columns */
.fnl-price-current {
    color: #006600;
    font-weight: bold;
    white-space: nowrap;
}

.fnl-price-bin {
    color: #CC6600;
    font-size: 11px;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
}

/* Bid count */
.fnl-bids-col {
    text-align: center;
    white-space: nowrap;
}

/* Time left */
.fnl-countdown {
    font-size: 11px;
    white-space: nowrap;
}

.fnl-time-soon {
    background: #FFFACD;
    padding: 1px 3px;
}

.fnl-time-urgent {
    background: #FFDDDD;
    color: #CC0000;
    font-weight: bold;
    padding: 1px 3px;
}

/* -------------------------------------------------------
   Status / Condition Badges
------------------------------------------------------- */
.fnl-badge-active {
    background: #006600;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-ended {
    background: #666666;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-sold {
    background: #CC0000;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-new {
    background: #003399;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-used {
    background: #999999;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-refurbished {
    background: #CC6600;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-auction {
    background: #003399;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

.fnl-badge-fixed {
    background: #006600;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 2px;
}

/* -------------------------------------------------------
   Listing Detail — Two-column layout
------------------------------------------------------- */
.fnl-breadcrumb {
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.fnl-breadcrumb a {
    color: #003399;
    text-decoration: none;
}

.fnl-breadcrumb a:hover {
    text-decoration: underline;
}

.fnl-detail-title {
    font-size: 16px;
    font-weight: bold;
    color: #003399;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #CCCCDD;
    padding-bottom: 6px;
}

.fnl-detail-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.fnl-detail-photo {
    flex: 0 0 auto;
    width: 300px;
}

.fnl-main-photo {
    max-width: 300px;
    width: 100%;
    height: auto;
    border: 1px solid #CCC;
    display: block;
}

.fnl-detail-photo .fnl-thumb-placeholder {
    width: 300px;
    height: 200px;
    font-size: 13px;
}

.fnl-detail-info {
    flex: 1;
    min-width: 0;
}

/* Info table */
.fnl-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 12px;
}

.fnl-info-table th {
    text-align: right;
    color: #003399;
    font-weight: bold;
    padding: 4px 8px 4px 0;
    width: 120px;
    white-space: nowrap;
    vertical-align: top;
}

.fnl-info-table td {
    text-align: left;
    padding: 4px 0;
    vertical-align: top;
}

.fnl-info-table .fnl-price-current {
    font-size: 16px;
}

/* Bid / BIN action box */
.fnl-action-box {
    border: 1px solid #AABBD4;
    background: #F5F8FF;
    padding: 10px;
    margin-bottom: 12px;
}

.fnl-bid-form-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.fnl-bid-form-row label {
    font-size: 12px;
    font-weight: bold;
    color: #003399;
}

.fnl-bid-form-row input[type="number"],
.fnl-bid-form-row input[type="text"] {
    font-size: 13px;
    padding: 3px 6px;
    border: 1px solid #999;
    width: 100px;
}

.fnl-bid-hint {
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}

/* Submit button (List Item / Save Changes) */
.fnl-btn-submit,
.fnl-btn-submit:visited,
.fnl-btn-submit:hover,
.fnl-btn-submit:visited:hover {
    color: #FFFFFF;
    text-decoration: none;
}

.fnl-btn-submit {
    display: inline-block;
    background-color: #003399;
    border: 1px solid #002277;
    padding: 2px 10px;
    font-size: 11px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.fnl-btn-submit:hover,
.fnl-btn-submit:visited:hover {
    background-color: #CC0000;
    border-color: #990000;
}

/* Buttons */
.fnl-btn-bid,
.fnl-btn-bin,
.fnl-btn-sell,
.fnl-btn-end {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border: 1px solid;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

/* Lock link text white across all states */
.fnl-btn-bid,
.fnl-btn-bid:visited,
.fnl-btn-bid:hover,
.fnl-btn-bid:visited:hover,
.fnl-btn-bin,
.fnl-btn-bin:visited,
.fnl-btn-bin:hover,
.fnl-btn-bin:visited:hover,
.fnl-btn-end,
.fnl-btn-end:visited,
.fnl-btn-end:hover,
.fnl-btn-end:visited:hover,
.fnl-btn-end-sm,
.fnl-btn-end-sm:visited,
.fnl-btn-end-sm:hover,
.fnl-btn-end-sm:visited:hover,
.fnl-btn-edit,
.fnl-btn-edit:visited,
.fnl-btn-edit:hover,
.fnl-btn-edit:visited:hover,
.fnl-btn-edit-sm,
.fnl-btn-edit-sm:visited,
.fnl-btn-edit-sm:hover,
.fnl-btn-edit-sm:visited:hover {
    color: #fff;
    text-decoration: none;
}

.fnl-btn-bid {
    background: #CC0000;
    border-color: #990000;
}

.fnl-btn-bid:hover {
    background: #EE0000;
}

.fnl-btn-bin {
    background: #FF6600;
    border-color: #CC4400;
}

.fnl-btn-bin:hover {
    background: #FF8833;
}

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

.fnl-btn-sell {
    background: #006600;
    border-color: #004400;
}

.fnl-btn-sell:hover,
.fnl-btn-sell:visited:hover {
    background: #008800;
}

.fnl-btn-end {
    background: #999;
    color: #fff;
    border-color: #666;
    font-size: 11px;
    padding: 2px 8px;
}

.fnl-btn-end:hover {
    background: #666;
}

.fnl-btn-end-sm {
    background: #999;
    color: #fff;
    border: 1px solid #666;
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
}

.fnl-btn-end-sm:hover {
    background: #666;
}

.fnl-btn-edit {
    display: inline-block;
    background: #003399;
    color: #fff;
    border: 1px solid #002277;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    text-decoration: none;
    cursor: pointer;
}

.fnl-btn-edit:hover {
    background: #002277;
    color: #fff;
    text-decoration: none;
}

.fnl-contact-seller {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #CCCCCC;
}

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

.fnl-btn-msg {
    display: inline-block;
    background: #336699;
    border: 1px solid #224477;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    cursor: pointer;
}

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

.fnl-btn-edit-sm {
    display: inline-block;
    background: #003399;
    color: #fff;
    border: 1px solid #002277;
    font-size: 11px;
    padding: 2px 8px;
    text-decoration: none;
    margin-right: 4px;
}

.fnl-btn-edit-sm:hover {
    background: #002277;
    color: #fff;
    text-decoration: none;
}

.fnl-owner-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.fnl-locked-field {
    display: inline-block;
    font-size: 12px;
    color: #666;
    background: #F0F0F0;
    border: 1px solid #CCC;
    padding: 4px 8px;
}

.fnl-td-actions {
    white-space: nowrap;
}

.fnl-bin-divider {
    font-size: 11px;
    color: #999;
    margin: 6px 0;
}

/* Description section */
.fnl-description {
    margin-bottom: 14px;
}

.fnl-description-body {
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #DDD;
    padding: 8px;
    background: #FAFAFA;
}

/* Bid history table */
.fnl-bids-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 12px;
}

.fnl-bids-table th {
    background: #CCCCDD;
    color: #003399;
    font-weight: bold;
    padding: 3px 6px;
    border: 1px solid #AABBD4;
    text-align: left;
}

.fnl-bids-table td {
    padding: 3px 6px;
    border: 1px solid #DDD;
}

.fnl-bids-table tr:nth-child(even) td {
    background: #F5F5FA;
}

.fnl-no-bids {
    color: #999;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 8px;
}

.fnl-back-link {
    font-size: 12px;
    margin-top: 10px;
}

.fnl-back-link a {
    color: #003399;
    text-decoration: none;
}

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

/* Login prompt */
.fnl-login-prompt {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.fnl-login-prompt a {
    color: #CC0000;
    font-weight: bold;
}

/* Sold / ended notice */
.fnl-listing-ended-notice,
.fnl-listing-sold-notice {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 8px;
}

.fnl-listing-ended-notice {
    background: #EEEEEE;
    border: 1px solid #999;
    color: #333;
}

.fnl-listing-sold-notice {
    background: #FFEEEE;
    border: 1px solid #CC0000;
    color: #CC0000;
}

/* -------------------------------------------------------
   Create Listing Form
------------------------------------------------------- */
.fnl-form-wrap {
    max-width: 560px;
}

.fnl-form-wrap h3 {
    font-size: 14px;
    color: #003399;
    border-bottom: 1px solid #CCCCDD;
    padding-bottom: 4px;
    margin: 14px 0 8px 0;
}

.fnl-field {
    margin-bottom: 10px;
}

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

.fnl-field input[type="text"],
.fnl-field input[type="number"],
.fnl-field input[type="url"],
.fnl-field select,
.fnl-field textarea {
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #999;
    width: 100%;
    box-sizing: border-box;
}

.fnl-field textarea {
    height: 80px;
    resize: vertical;
}

.fnl-field-note {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.fnl-field-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fnl-field-row .fnl-field {
    flex: 1;
    min-width: 120px;
}

.fnl-type-radios {
    display: flex;
    gap: 16px;
    margin-top: 4px;
}

.fnl-type-radios label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.fnl-bin-field,
.fnl-duration-field {
    /* shown/hidden by JS based on type selection */
}

.fnl-submit-row {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #DDD;
}

/* -------------------------------------------------------
   My Listings Table
------------------------------------------------------- */
.fnl-my-listings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 12px;
}

.fnl-my-listings-table th {
    background: #CCCCDD;
    color: #003399;
    font-weight: bold;
    padding: 4px 6px;
    border: 1px solid #AABBD4;
    text-align: left;
}

.fnl-my-listings-table td {
    padding: 4px 6px;
    border: 1px solid #DDD;
    vertical-align: middle;
}

.fnl-my-listings-table tr:nth-child(even) td {
    background: #F5F5FA;
}

.fnl-no-listings {
    color: #666;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 10px;
}

/* -------------------------------------------------------
   Pagination
------------------------------------------------------- */
.fnl-pagination {
    margin: 10px 0;
    font-size: 12px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.fnl-pagination a,
.fnl-pagination span {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid #AABBD4;
    color: #003399;
    text-decoration: none;
    background: #EEF2FF;
}

.fnl-pagination a:hover {
    background: #D0DEFF;
}

.fnl-pagination .fnl-page-current {
    background: #003399;
    color: #fff;
    border-color: #003399;
}

/* -------------------------------------------------------
   Sell / toolbar links
------------------------------------------------------- */
.fnl-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.fnl-toolbar-links {
    font-size: 12px;
}

.fnl-toolbar-links a {
    color: #003399;
    text-decoration: none;
    margin-left: 8px;
}

.fnl-toolbar-links a:hover {
    text-decoration: underline;
    color: #CC0000;
}

.fnl-sell-link {
    font-weight: bold;
    color: #006600 !important;
}

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

    .fnl-detail-photo {
        width: 100%;
    }

    .fnl-main-photo {
        max-width: 100%;
    }

    .fnl-detail-photo .fnl-thumb-placeholder {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .fnl-table th:nth-child(4),
    .fnl-table td:nth-child(4) {
        display: none; /* hide bids column on small screens */
    }

    .fnl-info-table th {
        width: 90px;
    }

    .fnl-field-row {
        flex-direction: column;
    }
}

/* ── Featured badge ─────────────────────────────────────────────────────── */
.fnl-featured-badge {
    display: inline-block;
    background: #FFCC00;
    color: #003399;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ── Feature button ─────────────────────────────────────────────────────── */
.fnl-btn-feature {
    display: inline-block;
    background: #FFCC00;
    color: #003399;
    border: 1px solid #CCA800;
    border-radius: 2px;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
    font-family: Arial, Helvetica, sans-serif;
}

.fnl-btn-feature:hover {
    background: #FFD700;
    border-color: #CC9900;
}
