/* =============================================
   Underground Landlord Forums - Styles
   Matches: dark header/footer, light blue bg, 
   white cards, soft borders, clean sans-serif
   ============================================= */

/* === Reset & Base === */
.ul-forums-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #2c3e50;
    width: 100%;
    padding: 30px 30px;
    line-height: 1.6;
    background: #f5f6f8;
    border-radius: 12px;
}

.ul-forums-wrap .ul-forums-view,
.ul-forums-wrap .ul-forums-breadcrumb,
.ul-forums-wrap .ul-forums-loading,
.ul-forums-wrap .ul-forums-login-prompt,
.ul-forums-wrap .ul-forums-courthouse-embed {
    max-width: 900px;
}

.ul-forums-wrap * {
    box-sizing: border-box;
}

/* === Login Prompt === */
.ul-forums-login-prompt {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ul-forums-prompt-logo {
    width: 60px;
    height: auto;
    margin-bottom: 10px;
}

.ul-forums-login-prompt h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1a2a3a;
}

.ul-forums-login-prompt p {
    color: #5a6a7a;
    margin: 0 0 20px;
}

/* === Buttons === */
.ul-forums-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    margin: 0 5px;
}

.ul-forums-btn-primary {
    background: #AADDFF;
    color: #1a2a3a;
    border-color: #AADDFF;
}

.ul-forums-btn-primary:hover {
    background: #88ccff;
    border-color: #88ccff;
    color: #1a2a3a;
    text-decoration: none;
}

.ul-forums-btn-outline {
    background: transparent;
    color: #1a2a3a;
    border-color: #AADDFF;
}

.ul-forums-btn-outline:hover {
    background: #AADDFF;
    color: #1a2a3a;
    text-decoration: none;
}

.ul-forums-btn-small {
    padding: 5px 14px;
    font-size: 12px;
}

.ul-forums-btn-danger {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.ul-forums-btn-danger:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.ul-forums-btn-secondary {
    background: #f0f4f8;
    color: #2c3e50;
    border-color: #d5dce4;
}

.ul-forums-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #b0bec5;
    color: #2c3e50;
    text-decoration: none;
}

/* === Breadcrumb === */
.ul-forums-breadcrumb {
    padding: 10px 0;
    font-size: 13px;
    color: #7a8a9a;
    margin-bottom: 5px;
}

.ul-forums-breadcrumb a {
    color: #AADDFF;
    text-decoration: none;
}

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

.ul-forums-breadcrumb .separator {
    margin: 0 6px;
    color: #b0bec5;
}

/* === Hub Header === */
.ul-forums-hub-header {
    text-align: left;
    padding: 25px 0 15px;
}

.ul-forums-hub-logo {
    width: 55px;
    height: auto;
    margin-bottom: 5px;
}

.ul-forums-hub-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #1a2a3a;
}

.ul-forums-hub-header p {
    color: #5a6a7a;
    margin: 0;
    font-size: 15px;
}

/* === State Selector === */
.ul-forums-state-selector {
    max-width: 400px;
    margin: 20px 0 30px;
    text-align: left;
}

.ul-forums-state-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #2c3e50;
}

.ul-forums-state-selector select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #d5dce4;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    appearance: auto;
    transition: border-color 0.2s;
}

.ul-forums-state-selector select:focus {
    outline: none;
    border-color: #AADDFF;
}

/* === State Hub Header === */
.ul-forums-state-header {
    text-align: left;
    padding: 20px 0 15px;
}

.ul-forums-state-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #1a2a3a;
}

.ul-forums-state-header p {
    color: #5a6a7a;
    margin: 0;
    font-size: 14px;
}

/* === Home State Bar === */
.ul-forums-home-state-bar {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ul-forums-home-state-set {
    font-size: 13px;
    color: #1a2a3a;
    font-weight: 600;
    background: #eef6ff;
    border: 1px solid #AADDFF;
    border-radius: 20px;
    padding: 4px 14px;
    display: inline-block;
}

.ul-forums-home-state-clear {
    font-size: 12px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

.ul-forums-home-state-clear:hover {
    text-decoration: underline;
}

/* === Topic Cards === */
.ul-forums-topic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.ul-forums-topic-card {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ul-forums-topic-card:hover {
    border-color: #AADDFF;
    box-shadow: 0 2px 10px rgba(58,143,194,0.12);
    transform: translateY(-1px);
}

.ul-forums-topic-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
    padding-top: 2px;
}

.ul-forums-topic-info {
    flex: 1;
    min-width: 0;
}

.ul-forums-topic-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2a3a;
    margin: 0 0 3px;
}

.ul-forums-topic-desc {
    font-size: 13px;
    color: #5a6a7a;
    margin: 0 0 8px;
}

.ul-forums-topic-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8a9aaa;
}

.ul-forums-topic-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.ul-forums-topic-stats {
    flex-shrink: 0;
    text-align: right;
    padding-top: 2px;
}

.ul-forums-topic-stats .stat-number {
    font-size: 18px;
    font-weight: 700;
    color: #AADDFF;
    display: block;
    line-height: 1;
}

.ul-forums-topic-stats .stat-label {
    font-size: 11px;
    color: #8a9aaa;
    text-transform: uppercase;
}

.ul-forums-topic-last-activity {
    font-size: 11px;
    color: #8a9aaa;
    margin-top: 4px;
}

/* === Thread List === */
.ul-forums-thread-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.ul-forums-thread-list-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1a2a3a;
}

.ul-forums-thread-table {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ul-forums-thread-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f6;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}

.ul-forums-thread-row:last-child {
    border-bottom: none;
}

.ul-forums-thread-row:hover {
    background: #f7fafd;
}

.ul-forums-thread-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ul-forums-thread-main {
    flex: 1;
    min-width: 0;
}

.ul-forums-thread-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ul-forums-thread-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a2a3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ul-forums-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ul-forums-badge-pinned {
    background: #e8f4fd;
    color: #2980b9;
}

.ul-forums-badge-locked {
    background: #fdf2e8;
    color: #e67e22;
}

.ul-forums-thread-byline {
    font-size: 12px;
    color: #8a9aaa;
    margin-top: 2px;
}

.ul-forums-thread-replies {
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}

.ul-forums-thread-replies .count {
    font-size: 16px;
    font-weight: 700;
    color: #AADDFF;
    display: block;
    line-height: 1;
}

.ul-forums-thread-replies .label {
    font-size: 10px;
    color: #8a9aaa;
    text-transform: uppercase;
}

.ul-forums-thread-last {
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    color: #8a9aaa;
    min-width: 100px;
}

.ul-forums-thread-last strong {
    display: block;
    color: #5a6a7a;
    font-weight: 600;
}

.ul-forums-empty {
    text-align: center;
    padding: 40px 20px;
    color: #8a9aaa;
}

.ul-forums-empty p {
    margin: 5px 0;
}

/* === Single Thread View === */
.ul-forums-thread-header {
    margin-bottom: 20px;
}

.ul-forums-thread-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #1a2a3a;
}

.ul-forums-thread-header-meta {
    font-size: 13px;
    color: #8a9aaa;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ul-forums-admin-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* === Post (OP + Replies) === */
.ul-forums-post {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ul-forums-post-op {
    border-left: 3px solid #AADDFF;
}

.ul-forums-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ul-forums-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ul-forums-post-author {
    font-weight: 600;
    color: #1a2a3a;
    font-size: 14px;
}

.ul-forums-post-date {
    font-size: 12px;
    color: #8a9aaa;
}

.ul-forums-post-content {
    font-size: 14px;
    line-height: 1.7;
    color: #2c3e50;
    word-wrap: break-word;
}

.ul-forums-post-content p {
    margin: 0 0 10px;
}

.ul-forums-post-content p:last-child {
    margin-bottom: 0;
}

.ul-forums-post-actions {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eef2f6;
}

/* === Reply Form === */
.ul-forums-reply-form {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ul-forums-reply-form h4 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #1a2a3a;
}

.ul-forums-reply-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #d5dce4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    color: #2c3e50;
}

.ul-forums-reply-form textarea:focus {
    outline: none;
    border-color: #AADDFF;
}

.ul-forums-reply-form .ul-forums-btn {
    margin-top: 10px;
}

.ul-forums-locked-notice {
    background: #fdf2e8;
    border: 1px solid #f0c27a;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    color: #8a6d3b;
    font-size: 13px;
    margin-top: 15px;
}

/* === New Thread Form === */
.ul-forums-new-thread-form {
    background: #fff;
    border: 1px solid #d5dce4;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.ul-forums-new-thread-form h3 {
    margin: 0 0 18px;
    font-size: 18px;
    color: #1a2a3a;
}

.ul-forums-form-group {
    margin-bottom: 15px;
}

.ul-forums-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.ul-forums-form-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d5dce4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    color: #2c3e50;
}

.ul-forums-form-group input[type="text"]:focus {
    outline: none;
    border-color: #AADDFF;
}

.ul-forums-form-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px 14px;
    border: 2px solid #d5dce4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    color: #2c3e50;
}

.ul-forums-form-group textarea:focus {
    outline: none;
    border-color: #AADDFF;
}

.ul-forums-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

/* === Pagination === */
.ul-forums-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.ul-forums-pagination button {
    padding: 6px 14px;
    border: 1px solid #d5dce4;
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.ul-forums-pagination button:hover {
    border-color: #AADDFF;
    color: #1a2a3a;
    background: #e8f4fd;
}

.ul-forums-pagination button.active {
    background: #AADDFF;
    color: #1a2a3a;
    border-color: #AADDFF;
}

.ul-forums-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Loading === */
.ul-forums-loading {
    text-align: center;
    padding: 30px;
    color: #8a9aaa;
    font-size: 14px;
}

.ul-forums-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #d5dce4;
    border-top-color: #AADDFF;
    border-radius: 50%;
    animation: ul-forums-spin 0.7s linear infinite;
    margin-bottom: 8px;
}

@keyframes ul-forums-spin {
    to { transform: rotate(360deg); }
}

/* === Error / Notice === */
.ul-forums-error {
    background: #fde8e8;
    border: 1px solid #f5b7b1;
    color: #c0392b;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.ul-forums-success {
    background: #e8fde8;
    border: 1px solid #a9dfbf;
    color: #27ae60;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* === Branding Footer === */
.ul-forums-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 10px;
    font-size: 12px;
    color: #8a9aaa;
}

.ul-forums-branding img {
    width: 28px;
    height: auto;
}

/* === Courthouse Finder Embed === */
.ul-forums-courthouse-embed {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #d5dce4;
}

/* === Responsive === */
@media (max-width: 600px) {
    .ul-forums-wrap {
        padding: 20px 15px;
    }

    .ul-forums-topic-card {
        padding: 14px;
    }

    .ul-forums-topic-stats {
        display: none;
    }

    .ul-forums-thread-row {
        padding: 12px 14px;
        flex-wrap: wrap;
    }

    .ul-forums-thread-last {
        display: none;
    }

    .ul-forums-thread-replies {
        min-width: 40px;
    }

    .ul-forums-thread-list-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ul-forums-post-header {
        flex-wrap: wrap;
    }

    .ul-forums-admin-actions {
        flex-direction: column;
    }

    .ul-forums-form-actions {
        flex-direction: column;
    }
}
