﻿/* =====================================
   GLOBAL
===================================== */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    padding-top: 80px;
}

.top_bar_container {
    width: 77%;
    height: 85%;
}

/* =====================================
   PAGE WRAPPER
===================================== */
.fd_page-wrapper {
    max-width: 85%;
    margin: 0 auto;
    padding: 20px 4px 40px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* =====================================
   PAGE HEADER
===================================== */
.fd_page-header {
    position: relative;
    text-align: center;
    margin-bottom: 28px;
}

.fd_page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
    line-height: 1.2;
    padding: 18px 0 10px;
    cursor: default;
    transition: color 0.25s ease;
}

    .fd_page-title:hover {
        color: #29B6F6;
    }

.fd_ask-btn-wrap {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.fd_msg-wrap {
    text-align: center;
    margin-bottom: 12px;
}

/* =====================================
   BUTTONS
===================================== */
.fd_btn-ask,
.fd_btn-post,
.btn-primary-custom,
.btn-secondary-custom {
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.fd_btn-ask,
.fd_btn-post {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #243474;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.4px;
    transition: background 0.2s;
}

.fd_btn-ask {
    padding: 11px 18px;
}

.fd_btn-post {
    padding: 12px 18px;
    margin-top: 12px;
}

    .fd_btn-ask:hover,
    .fd_btn-post:hover {
        background: #0d47a1;
        color: #fff !important;
    }

.fd_btn-ask .fd_btn-icon {
    font-size: 18px;
    line-height: 1;
}

.btn-primary-custom {
    background: #007bff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
}

.btn-secondary-custom {
    background: #6c757d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
}

.fd_post-btn-row {
    display: flex;
    justify-content: flex-end;
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* =====================================
   LEGACY QUESTION CARD
===================================== */
.question-card {
    max-width: 1000px;
    margin: 120px auto 40px auto;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* =====================================
   FD QUESTION / REPLY / OUTER CARDS
===================================== */
.fd_question-card,
.fd_reply-section,
.fd_outer-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,.09);
}

.fd_question-card {
    padding: 24px 28px;
    margin-bottom: 6px;
}

.fd_outer-card {
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.fd_reply-section {
    padding: 28px 28px 24px;
    margin-bottom: 20px;
}

.fd_q-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.fd_q-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8f0fe;
}

.fd_q-body {
    flex: 1;
}

.fd_q-name {
    font-size: 18px;
    font-weight: 700;
    color: #1565C0;
    margin: 0 0 6px;
}

.fd_q-desc {
    font-size: 15px;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.6;
}

.fd_q-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

    .fd_q-date .fd_cal-icon {
        color: #888;
        font-size: 14px;
    }

/* =====================================
   REPLY COUNT BAR
===================================== */
.fd_reply-count-bar {
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 700;
    color: #1565C0;
    letter-spacing: 1.5px;
    border-top: 1px solid #e8eaf0;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    transition: background 0.2s, color 0.2s;
}

    .fd_reply-count-bar::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 18px;
        background: #29B6F6;
        border-radius: 4px;
        transition: background 0.2s, height 0.2s;
    }

    .fd_reply-count-bar:hover {
        background: #f0fbff;
        color: #29B6F6;
    }

        .fd_reply-count-bar:hover::before {
            background: #1565C0;
            height: 22px;
        }

/* =====================================
   REPLIES
===================================== */
.fd_replies-wrap {
    padding: 0 0 16px;
}

.fd_reply-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px 14px 16px;
    margin-bottom: 10px;
    border-left: 4px solid #1565C0;
    background: #f4f8ff;
    border-radius: 0 10px 10px 0;
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

    .fd_reply-item:hover {
        background: #e0f4fd;
        border-left-color: #29B6F6;
        box-shadow: 0 4px 14px rgba(41, 182, 246, 0.18);
    }

        .fd_reply-item:hover .fd_reply-name,
        .fd_reply-item:hover .fd_reply-name span {
            color: #29B6F6 !important;
        }

.fd_reply-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.fd_reply-content {
    flex: 1;
}

.fd_reply-name {
    font-size: 15px;
    font-weight: 700;
    color: #1565C0;
    margin: 0 0 3px;
}

.fd_reply-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.fd_reply-text {
    font-size: 14px;
    color: #333;
    line-height: 1.55;
}

.fd_reply-dots {
    position: absolute;
    right: 14px;
    top: 14px;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    letter-spacing: 1px;
}

/* =====================================
   SECTION HEADING
===================================== */
.fd_section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.fd_heading-icon {
    width: 38px;
    height: 38px;
    background: #1565C0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.fd_heading-text {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

/* =====================================
   FORM LABELS & FIELD LAYOUT
===================================== */
.form-label,
label {
    color: #000 !important;
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
}

.fd_field-label {
    font-size: 13px;
    font-weight: 600;
    color: #222 !important;
    margin-bottom: 6px;
    display: block;
}

.fd_required-star {
    color: #e53935;
    margin-left: 2px;
}

.fd_field-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
}

.fd_field-col {
    flex: 1;
    min-width: 0;
}

.row-flex {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.col-half {
    flex: 1;
    min-width: 250px;
}

.fd_desc-label-row {
    margin-bottom: 8px;
}

/* =====================================
   INPUTS
===================================== */
.fd_input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #cdd5e0;
    border-radius: 8px;
    background: #fff;
    padding: 0 12px;
    transition: border-color 0.2s;
}

    .fd_input-wrap:focus-within {
        border-color: #1565C0;
    }

.fd_input-icon {
    color: #aab0be;
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.fd_input-field {
    width: 100%;
    border: none !important;
    outline: none !important;
    padding: 10px 0;
    background: transparent;
    font-size: 14px;
    color: #333;
}

    .fd_input-field::placeholder {
        color: #aab0be;
    }

.comment_input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #999;
    background-color: #fff;
    color: #000;
    font-size: 14px;
}

    .comment_input:focus {
        border-color: #007bff;
        outline: none;
    }

select.comment_input {
    background-color: #fff;
    color: #000;
}

.validation_message,
.fd_val-msg {
    color: #e53935;
    font-size: 13px;
    margin-top: 4px;
}

.description-cell {
    max-width: 600px;
    color: #000;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* =====================================
   TWO-COLUMN FIELDS TABLE
===================================== */
.fd_fields-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 20px 0;
    margin-left: -20px;
    margin-bottom: 10px;
}

.fd_field-td {
    width: 50%;
    vertical-align: top;
    padding: 0;
}

/* =====================================
   FOOTER NOTE
===================================== */
.fd_footer-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    font-size: 14px;
    color: #444;
}

.fd_footer-icon {
    color: #1565C0;
    font-size: 22px;
    flex-shrink: 0;
}

/* =====================================
   TABLET / MOBILE RESPONSIVE (<=768px)
===================================== */
@media only screen and (max-width: 768px) {

    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .top_bar_container {
        width: 100% !important;
        height: auto !important;
    }

    /* Containers */
    .container,
    .container-fluid,
    .wrapper,
    .content,
    .card,
    .card-container,
    .question-card,
    .fd_page-wrapper,
    .fd_reply-section,
    .fd_outer-card,
    .fd_question-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 15px !important;
    }

    .question-card {
        margin: 100px 10px 20px 10px !important;
    }

    .fd_page-title {
        font-size: 24px;
    }

    .fd_page-header {
        padding-bottom: 50px;
    }

    .fd_ask-btn-wrap {
        position: static;
        transform: none;
        margin-top: 15px;
        text-align: center;
    }

    /* Flex layouts collapse to single column */
    .row,
    .row-flex,
    .fd_field-row,
    .header-section,
    .button-section,
    .alignright {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .button-group {
        justify-content: center;
    }

    /* Buttons full width */
    .btn,
    .small-blue-btn,
    .fd_btn-ask,
    .fd_btn-post,
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-primary-custom,
    .btn-secondary-custom {
        width: 100% !important;
        display: block;
    }

    /* Inputs full width */
    input,
    select,
    textarea,
    button {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Question card */
    .fd_q-inner {
        flex-direction: column;
        text-align: center;
    }

    .fd_q-avatar {
        text-align: center;
    }

    /* Replies */
    .fd_reply-item {
        flex-direction: column;
        text-align: center;
    }

    .fd_reply-avatar {
        text-align: center;
    }

    /* Two-column fields table becomes stacked */
    .fd_fields-table,
    .fd_fields-table tbody,
    .fd_field-tr {
        display: block !important;
        width: 100% !important;
    }



    .fd_field-td {
        display: block !important;
        width: 93% !important;
        padding: 0 !important;
        margin-bottom: 15px;
        margin-left: 18px;
    }

    /* Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }

    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* CKEditor */
    .cke {
        width: 100% !important;
        max-width: 100% !important;
    }

    .cke_top {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .cke_toolbar {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
    }

    .cke_contents {
        min-height: 250px !important;
    }

    /* Headings */
    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    h3 {
        font-size: 20px !important;
    }
}

/* =====================================
   SMALL PHONES (<=480px)
===================================== */
@media only screen and (max-width: 480px) {

    .fd_page-title {
        font-size: 20px;
    }

    .fd_question-card,
    .fd_reply-section,
    .fd_outer-card,
    .fd_page-wrapper {
        padding: 12px !important;
    }

    .fd_q-avatar img {
        width: 70px;
        height: 70px;
    }

    .fd_reply-avatar img {
        width: 44px;
        height: 44px;
    }

    .fd_btn-ask,
    .fd_btn-post {
        font-size: 13px;
        padding: 10px 14px;
    }
}
