/*
 * custom.css — Thexyz Bootstrap 5 Overrides
 * bl.thexyz.com — Unified IP Block Checker
 *
 * Brand Palette
 * --primary-green : #768B1F  rgb(118, 139, 31)
 * --light-green   : #C9E082  rgb(201, 224, 130)
 * --pale-green    : #E5ECAB  rgb(229, 236, 171)
 * --accent-orange : #FC6700  rgb(252, 103, 0)
 * --accent-pink   : #FF3377  rgb(255, 51, 119)
 *
 * Typography
 * Body     : Montserrat (300, 400, 500, 600)
 * Headings : Manrope    (600, 700, 800)
 */

/* =========================================================
   GOOGLE FONTS
   Add this <link> in <head> BEFORE Bootstrap, or keep it
   here as a CSS @import — both work.
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&family=Montserrat:wght@300;400;500;600&display=swap');

/* =========================================================
   CSS VARIABLES
========================================================= */

:root {
    --xyz-primary:      #768B1F;
    --xyz-primary-dark: #5a6b17;
    --xyz-primary-rgb:  118, 139, 31;
    --xyz-light:        #C9E082;
    --xyz-pale:         #E5ECAB;
    --xyz-orange:       #FC6700;
    --xyz-orange-dark:  #d95900;
    --xyz-pink:         #FF3377;

    /* Bootstrap overrides via custom properties */
    --bs-primary:            #768B1F;
    --bs-primary-rgb:        118, 139, 31;
    --bs-link-color:         #768B1F;
    --bs-link-hover-color:   #5a6b17;

    /* Page */
    --page-bg:     #f4f5ee;
    --card-radius: 18px;
    --btn-radius:  8px;

    /* Typography */
    --font-body:     'Montserrat', system-ui, sans-serif;
    --font-headings: 'Manrope', system-ui, sans-serif;
}

/* =========================================================
   BASE
========================================================= */

body {
    background: var(--page-bg);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    color: #2a2e1a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Manrope for all heading levels */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--xyz-primary);
    text-decoration: none;
}

a:hover {
    color: var(--xyz-primary-dark);
    text-decoration: underline;
}

/* =========================================================
   TOOL CARD (outer wrapper)
========================================================= */

.tool-card {
    max-width: 1150px;
    margin: 40px auto;
    border: 0 !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 12px 40px rgba(var(--xyz-primary-rgb), 0.13) !important;
    background: #ffffff;
}

.tool-card > .card-body {
    padding: 2.5rem 3rem;
}

@media (max-width: 767px) {
    .tool-card > .card-body {
        padding: 1.5rem 1.25rem;
    }
}

/* =========================================================
   PAGE HEADING
========================================================= */

.tool-card h1.h3 {
    font-family: var(--font-headings);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--xyz-primary-dark);
    margin-bottom: 0.25rem;
}

.tool-card h1.h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.25em;
    background: var(--xyz-orange);
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 0.55rem;
    position: relative;
    top: -1px;
}

.tool-card p.text-muted {
    color: #5e6548 !important;
    font-size: 0.93rem;
}

/* =========================================================
   HELP / INFO BOX
========================================================= */

.help-box {
    border: 1.5px solid var(--xyz-light) !important;
    background: var(--xyz-pale) !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 0.88rem;
    color: #3d4820;
}

.help-box strong {
    color: var(--xyz-primary-dark);
}

/* =========================================================
   RATE LIMIT ALERT
========================================================= */

.alert-secondary {
    background: #f0f2e6;
    border: 1px solid var(--xyz-pale);
    border-radius: 10px;
    color: #444b28;
    font-size: 0.88rem;
}

.alert-secondary strong {
    color: var(--xyz-primary);
}

/* =========================================================
   DANGER ALERT (validation errors)
========================================================= */

.alert-danger {
    background: #fff0f4;
    border-color: var(--xyz-pink);
    color: #8f0030;
    border-radius: 10px;
}

/* =========================================================
   FORM
========================================================= */

.form-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: #3d4820;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-control {
    border: 1.5px solid #c9ccb5;
    border-radius: var(--btn-radius);
    background: #fafaf5;
    color: #2a2e1a;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
    border-color: var(--xyz-primary);
    box-shadow: 0 0 0 3px rgba(var(--xyz-primary-rgb), 0.18);
    background: #ffffff;
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.65rem 1rem;
}

.form-text {
    color: #7a8060;
    font-size: 0.8rem;
}

/* =========================================================
   PRIMARY BUTTON
========================================================= */

.btn-primary {
    background: var(--xyz-primary);
    border-color: var(--xyz-primary);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--btn-radius);
    letter-spacing: 0.01em;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.1s;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--xyz-primary-dark);
    border-color: var(--xyz-primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(var(--xyz-primary-rgb), 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary:disabled {
    background: #a3b050;
    border-color: #a3b050;
    opacity: 0.8;
}

/* =========================================================
   WARNING BUTTON (removal actions)
========================================================= */

.btn-warning {
    background: var(--xyz-orange);
    border-color: var(--xyz-orange);
    color: #ffffff !important;
    font-weight: 600;
    border-radius: var(--btn-radius);
    transition: background 0.18s, box-shadow 0.18s, transform 0.1s;
}

.btn-warning:hover,
.btn-warning:focus {
    background: var(--xyz-orange-dark);
    border-color: var(--xyz-orange-dark);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(252, 103, 0, 0.35);
    transform: translateY(-1px);
}

.btn-warning:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-outline-warning {
    border-color: var(--xyz-orange);
    color: var(--xyz-orange) !important;
    border-radius: var(--btn-radius);
    font-weight: 600;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.btn-outline-warning:hover {
    background: var(--xyz-orange);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(252, 103, 0, 0.28);
}

/* =========================================================
   RESULT CARDS
========================================================= */

.result-card {
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07) !important;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
    border-top: 3px solid var(--xyz-pale) !important;
}

.result-card:hover {
    box-shadow: 0 8px 28px rgba(var(--xyz-primary-rgb), 0.14) !important;
    transform: translateY(-2px);
}

.result-card .card-body {
    padding: 1.4rem 1.5rem;
}

.result-card h2.h5 {
    font-family: var(--font-headings);
    font-size: 0.97rem;
    font-weight: 700;
    color: #2a2e1a;
    letter-spacing: -0.01em;
}

.result-card p.mb-2 {
    font-size: 0.87rem;
    color: #4e5535;
    line-height: 1.55;
}

/* Blocked card — orange left accent */
.result-card:has(.badge.text-bg-danger) {
    border-top-color: var(--xyz-orange) !important;
}

/* Clean card — green left accent */
.result-card:has(.badge.text-bg-success) {
    border-top-color: var(--xyz-light) !important;
}

/* =========================================================
   BADGES
========================================================= */

.badge {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 6px;
    padding: 4px 9px;
}

/* Blacklisted → orange */
.badge.text-bg-danger {
    background: var(--xyz-orange) !important;
    color: #ffffff !important;
}

/* Not Listed → primary green */
.badge.text-bg-success {
    background: var(--xyz-primary) !important;
    color: #ffffff !important;
}

/* Unknown → muted sage */
.badge.text-bg-secondary {
    background: #b5ba9a !important;
    color: #2a2e1a !important;
}

/* =========================================================
   DETAILS TOGGLE LINK
========================================================= */

.click-indicator.btn-link {
    color: var(--xyz-primary) !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

.click-indicator.btn-link:hover {
    color: var(--xyz-orange) !important;
}

/* =========================================================
   INFO SECTION (collapsed details)
========================================================= */

.info-section {
    border-top: 1px solid #e8ead8 !important;
    margin-top: 14px;
    padding-top: 14px;
}

.info-section strong {
    font-family: var(--font-headings);
    color: var(--xyz-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.info-section.text-muted {
    color: #5e6548 !important;
    font-size: 0.82rem;
    line-height: 1.6;
}

/* =========================================================
   WARNING ALERT (error rows)
========================================================= */

.alert-warning {
    background: #fff5ec;
    border-color: #fcd2a8;
    color: #7a3300;
    border-radius: 8px;
    font-size: 0.84rem;
}

/* =========================================================
   INFO ALERT (bottom summary)
========================================================= */

.alert-info {
    background: var(--xyz-pale);
    border: 1.5px solid var(--xyz-light);
    color: #3d4820;
    border-radius: 12px;
    font-size: 0.87rem;
}

/* =========================================================
   RAW DATA PRE
========================================================= */

pre {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 260px;
    overflow: auto;
    font-size: 0.78rem;
    border-radius: 8px;
}

/* =========================================================
   ACTION BUTTONS SPACING
========================================================= */

.action-buttons .btn {
    margin-top: 10px;
    margin-right: 8px;
}

/* =========================================================
   SPINNER (loading state)
========================================================= */

.btn-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border-color: rgba(255,255,255,0.85);
    border-right-color: transparent;
}

/* =========================================================
   LOGO / BRANDING STRIP  (optional top bar)
   Add <div class="xyz-topbar"> at the top of <body> to use.
========================================================= */

.xyz-topbar {
    background: var(--xyz-primary);
    padding: 10px 0;
    text-align: center;
    font-family: var(--font-headings);
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.04em;
}

.xyz-topbar a {
    color: var(--xyz-light);
    font-weight: 600;
    text-decoration: none;
}

.xyz-topbar a:hover {
    color: #ffffff;
}

/* =========================================================
   SCROLLBAR (Webkit) — subtle brand touch
========================================================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--xyz-pale);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--xyz-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--xyz-primary);
}

/* =========================================================
   SECTION CARDS  (ip-block-checker.php two-column layout)
========================================================= */

.section-card {
    border: 0 !important;
    border-radius: 16px !important;
    padding: 1.75rem !important;
    background: #ffffff !important;
    height: 100%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border-top: 3px solid var(--xyz-pale) !important;
    transition: box-shadow 0.2s;
}

.section-card:hover {
    box-shadow: 0 8px 28px rgba(var(--xyz-primary-rgb), 0.11);
}

/* Section headings inside the two-pane cards */
.section-card > h2.h5 {
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 700;
    color: var(--xyz-primary-dark);
    letter-spacing: -0.01em;
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--xyz-pale);
}

/* OTP / verify state heading — green tint */
.section-card > h2.h5.text-success {
    color: var(--xyz-primary) !important;
    border-bottom-color: var(--xyz-light);
}

/* =========================================================
   SUCCESS ALERT
========================================================= */

.alert-success {
    background: #f2f7e0;
    border: 1.5px solid var(--xyz-light);
    color: var(--xyz-primary-dark);
    border-radius: 10px;
    font-weight: 500;
}

/* =========================================================
   SUCCESS BUTTON  (Verify & Unblock IP)
========================================================= */

.btn-success {
    background: var(--xyz-primary);
    border-color: var(--xyz-primary);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--btn-radius);
    letter-spacing: 0.01em;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.1s;
}

.btn-success:hover,
.btn-success:focus {
    background: var(--xyz-primary-dark);
    border-color: var(--xyz-primary-dark);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(var(--xyz-primary-rgb), 0.35);
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: none;
}

/* =========================================================
   OTP INPUT
========================================================= */

/* The big centred 6-digit code field */
#otp.form-control-lg {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
    border: 2px solid var(--xyz-light);
    border-radius: 12px;
    background: var(--xyz-pale);
    color: var(--xyz-primary-dark);
    padding: 0.75rem 1rem;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

#otp.form-control-lg:focus {
    border-color: var(--xyz-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(var(--xyz-primary-rgb), 0.18);
}

/* Helper text under OTP email sentence */
.section-card p.text-muted.small {
    font-size: 0.84rem;
    color: #5e6548 !important;
    line-height: 1.55;
}

/* Cancel link below OTP form */
a.btn-link.text-muted.small {
    font-size: 0.8rem;
    color: #8a9070 !important;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.15s;
}

a.btn-link.text-muted.small:hover {
    color: var(--xyz-orange) !important;
    text-decoration: none;
}

/* =========================================================
   IP STATUS INLINE ALERT  (Blocked / Not Blocked result)
========================================================= */

/* Blocked */
.section-card .alert-danger {
    background: #fff0ec;
    border: 1.5px solid var(--xyz-orange);
    color: #7a3300;
    border-radius: 10px;
    font-size: 0.87rem;
    font-weight: 500;
}

/* Not blocked */
.section-card .alert-success {
    background: #f2f7e0;
    border: 1.5px solid var(--xyz-light);
    color: var(--xyz-primary-dark);
    border-radius: 10px;
    font-size: 0.87rem;
    font-weight: 500;
}

/* =========================================================
   READONLY FIELD  (.readonly class on inputs)
========================================================= */

.form-control.readonly,
.form-control[readonly] {
    background: #f0f2e6 !important;
    border-color: #d4d8bf;
    color: #5e6548;
    cursor: default;
}

/* =========================================================
   DIVIDER + RAW API RESPONSE  (ip-block-checker.php bottom)
========================================================= */

.tool-card hr {
    border-color: #e4e7d4;
    opacity: 1;
    margin: 2rem 0;
}

.tool-card h2.h5:not(.section-card h2.h5) {
    font-family: var(--font-headings);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--xyz-primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}