/* BASE STYLES & RESETS                       */
/* Box-sizing, body, scrollbar, fonts,        */
/* tooltip, overlay, and quick-action button. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for all elements */
html {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: Aeonik, sans-serif, "Khmer OS Battambang" !important;
    background-color: white;
    color: var(--text-dark);
    font-size: 12px;
    /* Inherited from Bootstrap's Reboot, which the app no longer loads; every text block is sized against it. */
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* Prevent pull-to-refresh on mobile */
    overscroll-behavior-y: contain;
    /* Better touch scrolling */
    -webkit-overflow-scrolling: touch;
     /* height: auto !important; */
  min-height: 100%!important;
  box-sizing: border-box!important;
  -webkit-font-smoothing: inherit;
  --bs-btn-font-size: 0.9125rem;
}

/* Better image rendering */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Better button defaults */
button {
    font-family: inherit;
    /* The UA stylesheet leaves controls at line-height: normal, so they don't inherit the body value without this. */
    line-height: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Better input defaults */
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Utility: Hide scrollbar but keep functionality */
.scrollbar-hidden {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

/* Button Styles */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--calendar-green);
    color: white;
}

.btn-primary:hover {
    background: var(--calendar-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 179, 0, 0.2);
}

/* Stay green in every state — never the browser's default blue focus ring or disabled grey. */
.btn-primary:focus,
.btn-primary:active,
.btn-primary:disabled {
    background: var(--calendar-green);
    color: #fff;
}
.btn-primary:focus-visible {
    outline: 2px solid var(--calendar-green-dark);
    outline-offset: 2px;
}
.btn-primary:disabled {
    opacity: 0.75;
    transform: none;
    box-shadow: none;
    cursor: default;
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-link {
    background: none;
    border: none;
    color: var(--calendar-green);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s;
}

.btn-link:hover {
    color: var(--calendar-green-dark);
    text-decoration: underline;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* No data placeholder */
.no-data {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 0.9rem;
}
