/* =========================================================
   HABBA 2026 - GLOBAL CSS
   Safe for all pages
   No page-specific JS logic
   No field movement
   No password/email/RFID logic
   ========================================================= */

/* ---------------------------------------------------------
   Global Theme Variables
--------------------------------------------------------- */

:root {
    --habba-primary: #7a1538;
    --habba-primary-dark: #4f0d24;
    --habba-primary-soft: rgba(122, 21, 56, 0.08);
    --habba-accent: #d9a441;
    --habba-accent-soft: rgba(217, 164, 65, 0.15);
    --habba-bg: #f7f1e8;
    --habba-card: #ffffff;
    --habba-text: #1f2933;
    --habba-muted: #6b7280;
    --habba-border: #e5e0d8;
    --habba-focus: rgba(122, 21, 56, 0.18);
    --habba-error: #b42323;
    --habba-success: #16794c;
    --habba-warning: #9a6500;
    --habba-radius-lg: 22px;
    --habba-radius-md: 14px;
    --habba-radius-sm: 10px;
    --habba-shadow: 0 18px 45px rgba(79, 13, 36, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ---------------------------------------------------------
   Base Page
--------------------------------------------------------- */

html,
body {
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top left, rgba(217, 164, 65, 0.18), transparent 32%),
        linear-gradient(135deg, #fffaf2 0%, #f6f1ea 45%, #efe7dc 100%);
    color: var(--habba-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

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

a:hover,
a:focus {
    color: var(--habba-primary-dark);
    text-decoration: none;
}

/* ---------------------------------------------------------
   Main Containers
--------------------------------------------------------- */

#fContent {
    padding: 34px 15px 50px;
}

#fContent > .container,
.fPageTitle > .container,
#fFooter > .container,
.fHeader .container {
    max-width: 1100px;
}

/* ---------------------------------------------------------
   Page Title
--------------------------------------------------------- */

.fPageTitle {
    background: transparent !important;
    border: 0 !important;
    padding: 0;
    margin: 0 0 20px;
}

.fPageTitle h1,
#heading {
    text-align: center;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--habba-primary-dark);
    margin: 0;
    letter-spacing: -0.4px;
}

.fPageTitle h1::after,
#heading::after {
    content: "HABBA 2026";
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--habba-muted);
    margin-top: 8px;
    letter-spacing: 0;
}

/* ---------------------------------------------------------
   Generic Content Card
--------------------------------------------------------- */

#fMatter {
    width: 100%;
}

.fModule,
.fForm,
.fListing,
.fDetail,
.fContentCard,
.card,
.table-responsive {
    border-radius: var(--habba-radius-lg);
}

/* Only make forms card-like */
form.fForm {
    max-width: 980px;
    margin: 0 auto;
    background: var(--habba-card);
    border: 1px solid rgba(122, 21, 56, 0.08);
    border-radius: var(--habba-radius-lg);
    padding: 28px;
    box-shadow: var(--habba-shadow);
    position: relative;
    overflow: hidden;
}

form.fForm::before {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, var(--habba-primary), var(--habba-accent));
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
}

/* ---------------------------------------------------------
   Fieldsets
--------------------------------------------------------- */

form.fForm fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 24px;
    min-width: 0;
}

form.fForm fieldset legend {
    display: block;
    width: 100%;
    border: 0;
    padding: 0 0 10px;
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--habba-primary-dark);
    border-bottom: 1px solid var(--habba-border);
}

form.fForm fieldset legend:empty {
    display: none;
}

/* ---------------------------------------------------------
   fPHP Field Layout
--------------------------------------------------------- */

form.fForm .f-fieldset-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

form.fForm .form-item {
    margin: 0;
    width: 100%;
}

form.fForm .form-item-type-hidden {
    display: none !important;
}

/* Full width helper classes */
form.fForm .form-item-full,
form.fForm .full-width,
form.fForm .col-full {
    grid-column: 1 / -1;
}

/* ---------------------------------------------------------
   Labels
--------------------------------------------------------- */

form.fForm label {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 800;
    color: #334155;
    margin: 0 0 7px;
}

/* ---------------------------------------------------------
   Inputs / Selects / Textareas
--------------------------------------------------------- */

form.fForm input[type="text"],
form.fForm input[type="password"],
form.fForm input[type="email"],
form.fForm input[type="number"],
form.fForm input[type="tel"],
form.fForm input[type="url"],
form.fForm input[type="date"],
form.fForm input[type="time"],
form.fForm input[type="file"],
form.fForm select,
form.fForm textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--habba-border);
    border-radius: 12px;
    background-color: #ffffff;
    color: var(--habba-text);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 14px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

form.fForm input[type="file"] {
    padding: 9px 12px;
    line-height: 1.8;
}

form.fForm textarea {
    min-height: 110px;
    resize: vertical;
}

form.fForm select {
    cursor: pointer;
}

form.fForm input[type="text"]:focus,
form.fForm input[type="password"]:focus,
form.fForm input[type="email"]:focus,
form.fForm input[type="number"]:focus,
form.fForm input[type="tel"]:focus,
form.fForm input[type="url"]:focus,
form.fForm input[type="date"]:focus,
form.fForm input[type="time"]:focus,
form.fForm input[type="file"]:focus,
form.fForm select:focus,
form.fForm textarea:focus {
    border-color: var(--habba-primary);
    box-shadow: 0 0 0 4px var(--habba-focus);
    background-color: #fffdf9;
}

/* Required visual marker on input only.
   This does not add or remove stars. CMS controls label stars. */
form.fForm input[required],
form.fForm select[required],
form.fForm textarea[required] {
    background-image: linear-gradient(90deg, rgba(217, 164, 65, 0.16), rgba(217, 164, 65, 0));
    background-size: 5px 100%;
    background-repeat: no-repeat;
    background-position: left top;
}

/* Disabled / readonly */
form.fForm input:disabled,
form.fForm select:disabled,
form.fForm textarea:disabled,
form.fForm input[readonly],
form.fForm textarea[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* ---------------------------------------------------------
   Radio / Checkbox
--------------------------------------------------------- */

form.fForm input[type="radio"],
form.fForm input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--habba-primary);
    margin-right: 7px;
}

form.fForm .form-item-type-boolean label,
form.fForm .form-item-type-checkbox label,
form.fForm .form-item-type-radio label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    cursor: pointer;
}

/* ---------------------------------------------------------
   Hints / Errors
--------------------------------------------------------- */

form.fForm .hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--habba-muted);
}

form.fForm .hint span {
    color: var(--habba-muted);
}

form.fForm .form-item-error input,
form.fForm .form-item-error select,
form.fForm .form-item-error textarea {
    border-color: var(--habba-error);
    background-color: #fff8f8;
}

form.fForm .error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--habba-error);
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */

form.fForm .form-item-type-buttons,
form.fForm .buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin: 8px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--habba-border);
}

form.fForm input[type="submit"],
form.fForm input[type="button"],
form.fForm button,
.btn,
.button,
a.button {
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--habba-primary), var(--habba-primary-dark));
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    padding: 11px 26px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(122, 21, 56, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

form.fForm input[type="submit"]:hover,
form.fForm input[type="button"]:hover,
form.fForm button:hover,
.btn:hover,
.button:hover,
a.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(122, 21, 56, 0.28);
    filter: brightness(1.04);
}

form.fForm input[type="submit"]:active,
form.fForm input[type="button"]:active,
form.fForm button:active,
.btn:active,
.button:active,
a.button:active {
    transform: translateY(0);
}

/* Secondary links near buttons */
form.fForm .buttons a:not(.button):not(.btn),
form.fForm .form-item-type-buttons a:not(.button):not(.btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(122, 21, 56, 0.18);
    background: #ffffff;
    color: var(--habba-primary);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    padding: 10px 20px;
    box-shadow: none;
}

form.fForm .buttons a:not(.button):not(.btn):hover,
form.fForm .form-item-type-buttons a:not(.button):not(.btn):hover {
    background: rgba(122, 21, 56, 0.06);
    border-color: rgba(122, 21, 56, 0.35);
    color: var(--habba-primary-dark);
}

/* ---------------------------------------------------------
   fPHP Tables / Group Selection
--------------------------------------------------------- */

form.fForm .f-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

form.fForm .f-table-row {
    border: 0;
}

form.fForm .f-table-col {
    border: 0;
    padding: 8px 0;
}

form.fForm .user-register-group {
    background: linear-gradient(135deg, rgba(122, 21, 56, 0.08), rgba(217, 164, 65, 0.14));
    border: 1px solid rgba(122, 21, 56, 0.12);
    border-radius: 16px;
    padding: 15px 18px;
    margin-top: 8px;
    margin-bottom: 24px;
}

form.fForm .user-register-group .f-table,
form.fForm .user-register-group .f-table tbody,
form.fForm .user-register-group .f-table-row,
form.fForm .user-register-group .f-table-col {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
}

form.fForm .user-register-group-radio label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--habba-primary-dark);
    cursor: pointer;
}

/* ---------------------------------------------------------
   Messages
--------------------------------------------------------- */

#f-messages {
    max-width: 980px;
    margin: 0 auto 16px auto;
}

#f-messages:not(:empty) {
    background: #fff8e6;
    border: 1px solid rgba(217, 164, 65, 0.35);
    border-radius: 14px;
    color: #6b4a00;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
}

.alert,
.message,
.success,
.warning,
.error-message {
    border-radius: 14px;
    padding: 12px 15px;
    font-size: 14px;
}

/* ---------------------------------------------------------
   Listing / Tables
--------------------------------------------------------- */

table {
    border-collapse: collapse;
}

.table,
.f-listing-table,
.listing-list table {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
}

.table th,
.f-listing-table th,
.listing-list table th {
    background: rgba(122, 21, 56, 0.08);
    color: var(--habba-primary-dark);
    font-weight: 800;
    border-bottom: 1px solid var(--habba-border);
    padding: 12px;
}

.table td,
.f-listing-table td,
.listing-list table td {
    border-bottom: 1px solid #f0ebe4;
    padding: 12px;
    vertical-align: middle;
}

.table tr:hover td,
.f-listing-table tr:hover td,
.listing-list table tr:hover td {
    background: #fffaf2;
}

/* ---------------------------------------------------------
   Cards / Modules
--------------------------------------------------------- */

.fModule:not(.region-header .fModule):not(.region-footer .fModule) {
    margin-bottom: 22px;
}

.fModuleTitle h3,
.fHeading .fModuleTitle h3 {
    color: var(--habba-primary-dark);
    font-weight: 800;
    margin-bottom: 12px;
}

/* ---------------------------------------------------------
   Header / Footer Basic Safety
   Does not hide them globally.
--------------------------------------------------------- */

.fHeader {
    background: transparent;
}

#fFooter {
    margin-top: 40px;
    padding: 20px 0;
    color: var(--habba-muted);
}

/* ---------------------------------------------------------
   Scroll To Top
--------------------------------------------------------- */

#nav-up {
    width: 42px !important;
    height: 42px !important;
    right: 18px !important;
    bottom: 18px !important;
    border-radius: 50% !important;
    border: 0 !important;
    background: var(--habba-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(79, 13, 36, 0.24) !important;
}

#nav-up i {
    color: #ffffff !important;
}

/* ---------------------------------------------------------
   Utility Classes
--------------------------------------------------------- */

.habba-card {
    background: #ffffff;
    border: 1px solid rgba(122, 21, 56, 0.08);
    border-radius: var(--habba-radius-lg);
    box-shadow: var(--habba-shadow);
    padding: 24px;
}

.habba-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--habba-primary-dark);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--habba-border);
}

.habba-muted {
    color: var(--habba-muted);
}

.habba-text-center {
    text-align: center;
}

.habba-hidden {
    display: none !important;
}

/* ---------------------------------------------------------
   Mobile Responsive
--------------------------------------------------------- */

@media (max-width: 991px) {
    #fContent {
        padding: 28px 12px 42px;
    }

    form.fForm {
        padding: 24px 20px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    #fContent {
        padding: 22px 10px 35px;
    }

    .fPageTitle h1,
    #heading {
        font-size: 27px;
    }

    .fPageTitle h1::after,
    #heading::after {
        font-size: 13px;
    }

    form.fForm {
        padding: 22px 16px 18px;
        border-radius: 18px;
    }

    form.fForm .f-fieldset-body {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    form.fForm .form-item-type-buttons,
    form.fForm .buttons {
        flex-direction: column;
        align-items: stretch;
    }

    form.fForm input[type="submit"],
    form.fForm input[type="button"],
    form.fForm button,
    form.fForm .buttons a,
    form.fForm .form-item-type-buttons a {
        width: 100%;
        min-width: 0;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .table th,
    .f-listing-table th,
    .listing-list table th,
    .table td,
    .f-listing-table td,
    .listing-list table td {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    form.fForm {
        padding-left: 14px;
        padding-right: 14px;
    }

    form.fForm input[type="text"],
    form.fForm input[type="password"],
    form.fForm input[type="email"],
    form.fForm input[type="number"],
    form.fForm input[type="tel"],
    form.fForm input[type="url"],
    form.fForm input[type="date"],
    form.fForm input[type="time"],
    form.fForm input[type="file"],
    form.fForm select,
    form.fForm textarea {
        min-height: 46px;
        font-size: 14px;
    }
}