/**
 * Google Sans UX polish — typography, spacing, form controls
 * Loaded after main bundles so it overrides Roboto-era metrics.
 *
 * Auth pages (body.c-login) keep Fuel login.css metrics — form/button
 * polish below is scoped with body:not(.c-login).
 */

body,
body.admin-page {
    font-family: "Google Sans", sans-serif, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Shared form controls (exclude auth/login) ---------- */
body:not(.c-login) .c-form__label,
.form-label,
.c-form-admin .control-label {
    display: block;
    margin-bottom: 8px;
    color: #343a40;
    font-size:16px;
    font-weight: 500;
    line-height: 1.4;
}

body:not(.c-login) .c-form__field {
    padding: 10px 0;
}

body:not(.c-login) .c-form__input,
body:not(.c-login) .c-form__select--option,
body:not(.c-login) .c-form__textarea,
.c-form-admin .form-control,
.form-control,
.c-contact__form .form-control {
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    color: #212529;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body:not(.c-login) .c-form__input,
body:not(.c-login) .c-form__select--option {
    height: 48px;
}

body:not(.c-login) .c-form__textarea {
    height: auto;
    min-height: 135px;
    resize: vertical;
}

body:not(.c-login) .c-form__input::placeholder,
.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

body:not(.c-login) .c-form__input:hover:not(:disabled):not([readonly]),
.form-control:hover:not(:disabled):not([readonly]),
body:not(.c-login) .c-form__select--option:hover:not(:disabled),
body:not(.c-login) .c-form__textarea:hover:not(:disabled) {
    border-color: #adb5bd;
}

body:not(.c-login) .c-form__input:focus,
body:not(.c-login) .c-form__select--option:focus,
body:not(.c-login) .c-form__textarea:focus,
.form-control:focus,
.c-form-admin .form-control:focus,
.c-contact__form .form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

body:not(.c-login) .c-form__input.is-error,
body:not(.c-login) .c-form__textarea.is-error {
    border-color: #dc3545;
}

body:not(.c-login) .c-form__input[disabled],
body:not(.c-login) .c-form__input[readonly],
.form-control:disabled,
.form-control[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

body:not(.c-login) .js-password-toggle-wrapper .c-form__input,
body:not(.c-login) .js-password-toggle-wrapper input[type="password"],
.js-password-toggle-wrapper input.form-control,
.js-password-toggle-wrapper input.form-val {
    padding-right: 48px;
}

/* ---------- Native selects (.form-select) ---------- */
.form-select,
select.form-control,
select.form-control-lg,
select.form-select,
body:not(.c-login) .c-form__select--option,
.form-control.admin-select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: 48px;
    padding: 12px 40px 12px 14px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    color: #212529;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:hover:not(:disabled),
select.form-control:hover:not(:disabled),
select.form-control-lg:hover:not(:disabled),
.form-control.admin-select:hover:not(:disabled) {
    border-color: #adb5bd;
}

.form-select:focus,
select.form-control:focus,
select.form-control-lg:focus,
.form-control.admin-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-select:disabled,
select.form-control:disabled,
.form-control.admin-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 1;
}

.form-select-sm,
select.form-select-sm,
select.form-control-sm {
    min-height: 42px;
    height: 42px;
    padding: 8px 36px 8px 12px;
    font-size: 15px;
    background-position: right 12px center;
    background-size: 14px 10px;
    border-radius: 8px;
}

.d-flex > .form-select,
.d-flex > .form-select-sm,
form.row > .form-select,
form .form-select[style*="width:auto"],
form .form-select-sm[style*="width:auto"] {
    width: auto;
    min-width: 180px;
    flex: 1 1 180px;
}

body.admin-page .form-select,
body.admin-page select.form-control,
body.admin-page .form-control.admin-select,
body.admin-page .admin-filter .form-control,
body.admin-page .admin-filter .admin-select,
body.admin-page form .admin-select {
    min-height: 44px !important;
    height: 44px !important;
    padding: 10px 38px 10px 14px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    background-position: right 12px center !important;
}

body.admin-page .form-select-sm {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 15px !important;
    min-width: 160px;
}

/* ---------- Buttons (exclude auth/login) ---------- */
body:not(.c-login) .c-form__submit,
.btn,
.c-contact__form .btn-lg {
    min-height: 48px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    line-height: 1.5;
}

.btn {
    min-height: 44px;
    padding: 0.625rem 1.125rem;
    font-size: 15px;
    font-weight: 500;
}

.btn-sm {
    min-height: 32px;
}

body.admin-page .btn {
    min-height: 40px;
    border-width: 1.5px;
    border-radius: 10px;
    font-weight: 600;
}

body.admin-page .btn-sm {
    min-height: 34px;
}

body.admin-page .btn-primary {
    border-color: #e6b800;
    background: #fed600;
    color: #0f0818 !important;
    font-weight: 700;
}

body.admin-page .btn-outline-primary {
    border-color: #0f0818;
    background: #fff;
    color: #0f0818 !important;
}

body.admin-page .btn-outline-primary:hover,
body.admin-page .btn-outline-primary:focus {
    border-color: #e6b800;
    background: #fed600;
    color: #0f0818 !important;
}

body.admin-page .btn-success {
    border-color: #6f9400;
    background: #83ad02;
    color: #fff !important;
}

body.admin-page .btn-danger,
body.admin-page .btn-outline-danger:hover {
    color: #fff !important;
}

body.admin-page .btn-outline-danger {
    border-color: #b42c2c;
    background: #fff;
    color: #9a2424 !important;
}

body.admin-page .form-control {
    min-height: 44px;
    border-radius: 8px;
    font-size:16px;
}

body.admin-page .form-label {
    margin-bottom: 0.5rem;
}

/* ---------- Auth/login: lux card polish (Fuel login.css owns layout) ---------- */
body.c-login .c-login__copy--text a {
    display: block;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

body.c-login .c-login__copy--link a {
    color: inherit;
}

body.c-login .c-form__submit {
    width: 100%;
}

body.c-login .c-form__submit.c-login__copy--text,
body.c-login button.c-login__copy--text {
    color: #0f0818;
}

body.c-login .c-form__submit.c-login__copy--text:hover,
body.c-login button.c-login__copy--text:hover,
body.c-login .c-form__submit.c-login__copy--text:hover .c-login__submit,
body.c-login button.c-login__copy--text:hover .c-login__submit {
    color: #0f0818;
}

body.c-login button.c-form__primary {
    display: inline;
    width: auto;
    min-height: 0;
    margin: 8px 0 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #0f0818;
    font: inherit;
    font-size: 16px;
    cursor: pointer;
}

body.c-login button.c-form__primary:hover {
    text-decoration: underline;
}

body.c-login .c-btn--primary.c-form__submit,
body.c-login .c-btn.c-btn--primary {
    width: 100%;
    min-height: 48px;
    border: 1px solid #fed600;
    border-radius: 999px;
    background: #fed600;
    color: #0f0818;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(254, 214, 0, 0.28);
}

body.c-login .c-btn--primary.c-form__submit:hover,
body.c-login .c-btn.c-btn--primary:hover {
    background: #fff;
    color: #0f0818;
}

/* ---------- Select2 (match input height) ---------- */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single,
.form-group .select2-container--default .select2-selection--single {
    box-sizing: border-box;
    height: 48px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background-color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered,
.form-group .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
    padding-left: 14px;
    padding-right: 36px;
    color: #212529;
    font-family: inherit;
    font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow,
.form-group .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
    width: 32px;
    right: 6px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.select2-container--default .select2-selection--multiple {
    min-height: 48px;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 8px;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
}

.select2-results__option {
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.4;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
}

.input-group-text {
    border-radius: 0 8px 8px 0;
    font-size: 16px;
}

/* ---------- Nav: submenu = parent size ---------- */
.c-header:not(.c-header--luxury) .c-nav__link,
.c-nav__sub-menu__link {
    font-size: 2.1rem;
    letter-spacing: 1.2px;
}

@media (min-width: 1024px) {
    .c-header:not(.c-header--luxury) .c-nav__link,
    .c-nav__sub-menu__link {
        font-size:16px;
        letter-spacing: normal;
    }
}

/* Member / header Bootstrap dropdown */
.c-nav .nav-link,
.c-header:not(.c-header--luxury) .nav-link,
.c-nav .dropdown-menu .dropdown-item,
.c-header:not(.c-header--luxury) .dropdown-menu .dropdown-item,
.c-btn__dropdown .dropdown-item,
.c-header:not(.c-header--luxury) .c-btn__dropdown .dropdown-item {
    font-size:16px !important;
    font-weight: 500;
    line-height: 1.5;
}

.c-header--luxury .c-nav .nav-link {
    font-size: 13px !important;
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.3;
}

.c-header--luxury .dropdown-menu .dropdown-item,
.c-header--luxury .c-btn__dropdown .dropdown-item {
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.45;
}

.c-btn__dropdown {
    font-size:16px !important;
}

/* ---------- Status badges (compact) ---------- */
.badge,
.c-post-signle__status-badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    vertical-align: middle;
    white-space: nowrap;
}

/* Keep decorative leaderboard medals larger */
.c-leaderboard .badge--medal {
    font-size: 16px !important;
    padding: 0.5rem 0.75rem;
}

.c-leaderboard .badge--rank {
    font-size:16px !important;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

.badge.bg-warning,
.badge.bg-warning.text-dark {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
}

.badge.bg-info,
.badge.text-bg-info {
    background-color: #0dcaf0 !important;
    color: #055160 !important;
}

/* ---------- Search ---------- */
.c-search__input {
    padding: 10px 44px 10px 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
}

/* ---------- Contact ---------- */
.c-contact__form .form-label {
    font-size:16px;
}

.c-contact__form .btn-lg {
    min-height: 48px;
    border-radius: 8px;
}

/* ---------- Mobile: avoid iOS zoom on focus ---------- */
@media (max-width: 767px) {
    .c-form__input,
    .c-form__select--option,
    .c-form__textarea,
    .form-control,
    .form-select,
    .form-select-sm,
    select.form-control,
    .c-contact__form .form-control {
        font-size: 16px;
    }

    .d-flex > .form-select,
    .d-flex > .form-select-sm,
    form .form-select,
    form .form-select-sm {
        min-width: 100%;
        flex: 1 1 100%;
    }
}

