/* Main styles for CPRESS CRM */

:root,
:host {
    --pico-font-size: 77%; /* Base font size increased by 10% from 70% */
    --pico-spacing: 0.75rem; /* Smaller global spacing */
    --pico-form-element-spacing-vertical: 0.5rem; /* Smaller button/input padding */
    --pico-form-element-spacing-horizontal: 0.75rem; /* Smaller button/input padding */
    --pico-border-radius: 0.3rem; /* Slightly smaller corners */
    --pico-typography-spacing-vertical: 0.75rem; /* Tighter typography spacing */
    --pico-block-spacing-vertical: 0.75rem; /* Tighter block spacing */
    --pico-grid-column-gap: 0.75rem; /* Smaller grid gaps */
    --pico-grid-row-gap: 0.75rem;
}

/* Scale down font sizes for larger screens */
@media (min-width: 576px) {
    :root,
    :host {
        --pico-font-size: 82.5%; /* Increased by 10% from 75% */
    }
}
@media (min-width: 768px) {
    :root,
    :host {
        --pico-font-size: 88%; /* Increased by 10% from 80% */
    }
}
@media (min-width: 1024px) {
    :root,
    :host {
        --pico-font-size: 93.5%; /* Increased by 10% from 85% */
    }
}

/* Headings increased by 10% */
h1 { --pico-font-size: 1.32rem; } /* Increased from 1.2rem */
h2 { --pico-font-size: 1.1rem; }  /* Increased from 1rem */
h3 { --pico-font-size: 0.99rem; } /* Increased from 0.9rem */
h4 { --pico-font-size: 0.88rem; } /* Increased from 0.8rem */
h5 { --pico-font-size: 0.77rem; } /* Increased from 0.7rem */
h6 { --pico-font-size: 0.66rem; } /* Increased from 0.6rem */

/* Adjust button-specific spacing if still too large */
:root button,
:root input[type="submit"],
:root input[type="button"],
:root input[type="reset"] {
    display: inline-block;
    width: auto; /* Override 100% width */
    --pico-form-element-spacing-vertical: 0.375rem;
    --pico-form-element-spacing-horizontal: 0.75rem;
}

/* Top-align table contents */
td,
th {
    vertical-align: top;
}

/* Flash message styling */
.flash-message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: var(--pico-border-radius);
}
.flash-error {
    background-color: #ffeeee;
    color: #cc0000;
    border: 1px solid #ffcccc;
}
.flash-info {
    background-color: #eeeeff;
    color: #0000cc;
    border: 1px solid #ccccff;
}
.flash-success {
    background-color: #eeffee;
    color: #00cc00;
    border: 1px solid #ccffcc;
}

/* Text utilities */
.text-center {
    text-align: center;
}

/* Login page specific */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

/* Stock validation highlighting */
.positive-diff {
    background-color: rgba(0, 255, 0, 0.2);  /* Green when calc > stored */
}
.negative-diff {
    background-color: rgba(255, 0, 0, 0.2);  /* Red when calc < stored */
}

/* Make diff cells bold */
.diff-cell {
    font-weight: bold;
}

*[role="button"].warning {
    color: var(--pico-contrast-inverse);
    background: #ffc107;
    border-color: #ffc107;
}
