/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Manual Prose Styling for SEO Content */
.prose {
    color: #475569;
    /* slate-600 */
    line-height: 1.75;
}

.prose h1 {
    font-size: 1.875rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    /* slate-900 */
    margin-top: 0 !important;
    margin-bottom: 2rem !important;
    letter-spacing: -0.025em !important;
    display: block !important;
}

.prose h2 {
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin-top: 3rem !important;
    margin-bottom: 1.5rem !important;
    letter-spacing: -0.025em !important;
    display: block !important;
}

.prose h3 {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    display: block !important;
}

.prose p {
    margin-bottom: 1.5rem !important;
    display: block !important;
}

.prose ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    display: block !important;
}

.prose li {
    margin-bottom: 0.5rem !important;
    display: list-item !important;
}

.prose a {
    color: #5048e5 !important;
    /* primary */
    font-weight: 900 !important;
    text-decoration: none !important;
}

.prose a:hover {
    text-decoration: underline !important;
}

.prose strong {
    color: #0f172a !important;
    font-weight: 900 !important;
}

.prose table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 2rem !important;
    font-size: 0.875rem !important;
    display: table !important;
}

.prose th {
    background-color: #f8fafc !important;
    /* slate-50 */
    border: 1px solid #f1f5f9 !important;
    /* slate-100 */
    padding: 0.75rem !important;
    text-align: left !important;
    font-weight: 900 !important;
    color: #0f172a !important;
}

.prose td {
    border: 1px solid #f1f5f9 !important;
    padding: 0.75rem !important;
}

.prose hr {
    border: 0 !important;
    border-top: 1px solid #f1f5f9 !important;
    margin: 3rem 0 !important;
    display: block !important;
}

.prose pre {
    background-color: #f8fafc !important;
    border: 1px solid #f1f5f9 !important;
    padding: 1.5rem !important;
    border-radius: 1rem !important;
    overflow-x: auto !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    margin-bottom: 2rem !important;
    color: #334155 !important;
    /* slate-700 */
}

.prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    background-color: #f1f5f9 !important;
    padding: 0.2rem 0.4rem !important;
    border-radius: 0.375rem !important;
    font-size: 0.875em !important;
    color: #4f46e5 !important;
    /* indigo-600 for inline code */
    display: inline !important;
    max-width: 100% !important;
  word-break: break-word !important;
}

.prose pre code {
  background-color: transparent !important;
  border-radius: 0 !important;
  color: inherit !important;
  display: block !important;
  padding: 0 !important;
  white-space: inherit !important;
  word-break: normal !important;
}


/* Hide native number input steppers */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: none;
}

/* Tool Input Responsive Stacking */
.tool-input-responsive-group {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* Unit Selector Fixes (Desktop & Global) */
.unit-selector-tray {
    position: relative;
    display: flex;
    align-items: center;
    border-left: 1px solid #e2e8f0; /* slate-200 */
    border-radius: 0 1rem 1rem 0; /* rounded-r-2xl (16px) */
}

.unit-selector-tray select {
    padding-left: 1.5rem !important;
    /* 24px (pl-6) - space from divider */
    padding-right: 2.5rem !important;
    /* 40px - room for icon */
    text-align: left;
}

.unit-selector-tray .absolute {
    right: 0.75rem !important;
    /* right-3 */
    left: auto !important;
}

@media (max-width: 500px) {
    .tool-input-responsive-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .tool-input-responsive-group .unit-selector-tray {
        border-left: none !important;
        border-top: 1px solid #e2e8f0 !important;
        border-radius: 0 0 1rem 1rem !important; /* rounded-b-2xl */
        width: 100% !important;
    }

    .tool-input-responsive-group .whitespace-nowrap {
        text-align: center !important;
        width: 100% !important;
    }
}

/* Premium Input Padding to replace potentially missing Tailwind pl-12 */
.premium-input-padding {
    padding-left: 1.75rem !important;
    /* Approx 28px (~0.7in/1.1cm depending on DPI) */
}

.premium-select-padding {
    padding-left: 2.5rem !important;
    /* 40px */
}

/* Add missing right padding to handle icons correctly */
.premium-input-padding-right {
    padding-right: 3.5rem !important;
    /* 56px */
}

/* Ensure the relative container for icons actually takes full width */
.group.relative.flex.items-center {
    width: 100%;
}

/* Bulletproof Multi-Input Row Layout */
.multi-input-row {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.multi-input-name {
    flex: 1;
    min-width: 150px;
    border-right: 1px solid #f1f5f9;
    /* slate-100 */
    display: flex;
    align-items: center;
}

.multi-input-quantity {
    flex: 0 0 auto;
    width: 320px;
    display: flex;
    align-items: center;
    border-right: 1px solid #f1f5f9;
}

.multi-input-trash {
    flex: 0 0 auto;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .responsive-table-headers thead {
        display: none !important;
    }

    .multi-input-row {
        display: grid !important;
        grid-template-columns: 1fr 120px 60px !important;
        /* Name | Quantity | Trash */
        grid-template-rows: auto auto !important;
    }

    .multi-input-name {
        grid-column: 1 / 2;
        grid-row: 1;
        width: 100%;
        border-right: 1px solid #f1f5f9;
        /* slate-100 */
        border-bottom: 1px solid #f1f5f9;
        min-width: 0;
    }

    .multi-input-quantity {
        display: contents !important;
        /* Elevates children directly into the grid */
    }

    .multi-input-quantity>input {
        /* Number field */
        grid-column: 2 / 3;
        grid-row: 1;
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid #f1f5f9;
        border-right: 1px solid #f1f5f9;
        min-width: 0;
    }

    .multi-input-quantity>.unit-selector-tray {
        /* Select field */
        grid-column: 1 / 4;
        /* Spans full width of row 2 */
        grid-row: 2;
        width: 100% !important;
        border-left: none !important;
        border-right: none !important;
        background-color: transparent !important;
        justify-content: center !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .multi-input-quantity>.unit-selector-tray select {
        width: 100% !important;
        text-align: center !important;
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }

    .multi-input-trash {
        grid-column: 3 / 4;
        grid-row: 1;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .multi-input-trash>button {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        border-top-right-radius: 1rem !important;
        /* Matches container */
        border-bottom-left-radius: 0 !important;
    }
}
