/* Shared Utility Classes */

/* Spacing */
.m-0 {
    margin: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

/* Width & Height */
.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.w-fit {
    width: fit-content;
}

/* Display */
.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.img-fluid {
    display: block;
    height: auto;
    max-width: 100%;
}

.hidden {
    display: none !important;
}

/* Keep !important for .hidden as it is a critical state override */

.sr-only {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Borders & Shapes */
.rounded {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Typography */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.ml-auto {
    margin-left: auto;
}

.mr-auto {
    margin-right: auto;
}

.required-star {
    color: var(--color-danger);
    margin-left: 2px;
}

/* Feedback/Status */
.text-error {
    color: var(--color-error-text) !important;
}

.bg-error-light {
    background-color: #fff5f5 !important;
    /* Specific light error tint */
}

.border-error {
    border: 1px solid var(--color-error-text) !important;
}

/* Grid Helpers */
.full-width {
    grid-column: 1 / -1 !important;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Flex Helpers */
.flex {
    display: flex;
    gap: var(--spacing-md);
}

.flex-center {
    justify-content: center;
    align-items: center;
    display: flex;
}

.flex-between {
    justify-content: space-between;
    align-items: center;
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-md {
    gap: var(--spacing-md);
}