/* House of Madras – shared UI styles for frontend and admin (see public/js/hom-ui.js) */

/* ---------- Buttons: one cursor style everywhere ---------- */
button,
[type="submit"],
[type="button"],
[type="reset"],
[role="button"],
.btn,
label[for],
select {
    cursor: pointer;
}
button:disabled,
[type="submit"]:disabled,
.btn.disabled,
.btn:disabled {
    cursor: not-allowed;
}

/* ---------- Page loader ---------- */
.hom-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 250, 244, .92);
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease, visibility .3s ease;
}
.hom-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.hom-loader__spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid rgba(230, 126, 34, .2);
    border-top-color: #e67e22;
    animation: hom-spin .8s linear infinite;
}
.hom-loader__text {
    margin-top: 14px;
    font: 600 13px/1 'Poppins', sans-serif;
    letter-spacing: .5px;
    color: #2c1f0e;
}
.hom-loader__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}
@keyframes hom-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .hom-loader__spinner { animation-duration: 2s; }
}

/* ---------- Form validation ---------- */
.field-error {
    display: none;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    color: #c0392b;
    text-align: left;
}
.field-error.is-visible { display: block; }
.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, .12) !important;
}
