/* ==========================================================================
   infostock.bg - legal norms & law gazette pages (v2)
   Loaded on screens/norms/: norms_list.jsp, norms_lawgazette_list.jsp,
   norm_view.jsp.
   Scoped under body.v2 so it cannot leak into legacy pages.
   ========================================================================== */

/* ---------- norms card & container ---------- */
body.v2 .norms_card {
    background: #fff;
    border: 1px solid #dfe7f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(30, 66, 128, .06);
    padding: 28px 32px;
    margin-bottom: 24px;
}

body.v2 .norms_card > .heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

body.v2 .norms_card > .heading h1,
body.v2 .norms_card > .heading h2 {
    color: #1e4280;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    margin: 0;
    padding: 0;
}

body.v2 .norms_card > .heading .rule {
    flex: 1 1 auto;
    height: 2px;
    min-width: 12px;
    background: #1e4280;
    opacity: .85;
}

/* ---------- filter toolbar ---------- */
body.v2 .norms_filter_toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #dfe7f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(30, 66, 128, .06);
}

body.v2 .norms_filter_toolbar .filter_inputs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

body.v2 .norms_filter_toolbar .filter_group {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

body.v2 .norms_filter_toolbar input.editbox {
    height: 36px;
    padding: 0 12px;
    border: 1px solid #cdd6e2;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2733;
    background: #fff;
}

body.v2 .norms_filter_toolbar input.editbox:focus {
    outline: none;
    border-color: #1e4280;
    box-shadow: 0 0 0 3px rgba(30, 66, 128, .12);
}

body.v2 .norms_filter_toolbar .filter_buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

body.v2 .norms_filter_toolbar .btn_action {
    background: #1e4280;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
}

body.v2 .norms_filter_toolbar .btn_action:hover {
    background: #153366;
}

body.v2 .norms_filter_toolbar .btn_action_secondary {
    background: #f0f3f6;
    color: #4a5568;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    min-height: 36px;
}

body.v2 .norms_filter_toolbar .btn_action_secondary:hover {
    background: #e2e8f0;
    color: #1a2740;
}

/* ---------- ciela credit line ---------- */
body.v2 .ciela_credit {
    font-size: 13px;
    color: #6b7686;
    margin-bottom: 18px;
    line-height: 1.4;
}

body.v2 .ciela_credit a {
    color: #1e4280;
    font-weight: 600;
}

/* ---------- norms list items ---------- */
body.v2 .norms_list_items {
    margin: 10px 0;
}

body.v2 .norms_list_items .norm_item {
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
    font-size: 15px;
    line-height: 1.5;
}

body.v2 .norms_list_items .norm_item:last-child {
    border-bottom: none;
}

body.v2 .norms_list_items .norm_item a.speclnk {
    color: #1e4280;
    font-weight: 600;
    text-decoration: none;
}

body.v2 .norms_list_items .norm_item a.speclnk:hover {
    color: #153366;
    text-decoration: underline;
}

/* ---------- law gazette specific sections ---------- */
body.v2 .lawgazette_section_title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2740;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #739fcc;
}

body.v2 .lawgazette_section_title:first-child {
    margin-top: 6px;
}

/* ---------- norm document viewer ---------- */
body.v2 .norm_doc_content {
    font-size: 16px;
    line-height: 1.7;
    color: #1f2733;
    overflow-wrap: break-word;
    word-wrap: break-word;
    margin-top: 14px;
}

body.v2 .norm_doc_content p {
    margin: 14px 0;
    font-size: 16px;
    line-height: 1.7;
}

body.v2 .norm_doc_content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

body.v2 .norm_doc_content td,
body.v2 .norm_doc_content th {
    padding: 8px 10px;
    border: 1px solid #dfe7f0;
    font-size: 14px;
}

body.v2 .norm_doc_content strong,
body.v2 .norm_doc_content b {
    color: #1a2740;
    font-weight: 700;
}

/* ---------- responsive breakpoints ---------- */
@media (max-width: 640px) {
    body.v2 .norms_card {
        padding: 18px 16px;
        border-radius: 6px;
    }
    body.v2 .norms_card > .heading h1,
    body.v2 .norms_card > .heading h2 {
        font-size: 19px;
    }
    body.v2 .norms_filter_toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 12px;
    }
    body.v2 .norms_filter_toolbar .filter_buttons {
        margin-left: 0;
        width: 100%;
    }
    body.v2 .norms_filter_toolbar .btn_action,
    body.v2 .norms_filter_toolbar .btn_action_secondary {
        flex: 1 1 0;
        text-align: center;
    }
}
