/**
 * Fuchsia Background Colors
 * Provides background color utility classes for fuchsia shades.
 * 
 * @access public
 */
 .bg-fuchsia-300 { 
    --tw-bg-opacity: 1; 
    background-color: rgba(240, 171, 252, var(--tw-bg-opacity)); 
}

.bg-fuchsia-400 { 
    --tw-bg-opacity: 1; 
    background-color: rgba(232, 121, 249, var(--tw-bg-opacity)); 
}

.bg-fuchsia-500 { 
    --tw-bg-opacity: 1; 
    background-color: rgba(217, 70, 239, var(--tw-bg-opacity)); 
}

.bg-fuchsia-600 { 
    --tw-bg-opacity: 1; 
    background-color: rgba(192, 38, 211, var(--tw-bg-opacity)); 
}

.bg-fuchsia-800 { 
    --tw-bg-opacity: 1; 
    background-color: rgba(134, 25, 143, var(--tw-bg-opacity)); 
}

/**
 * #validation-list
 * Removes default styling for lists and ensures proper spacing.
 * 
 * @access public
 */
 #validation-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/**
 * Invalid Select Styles
 * Styles select elements in an invalid state, excluding custom select wrappers.
 * 
 * @access public
 * @selector select:invalid:not([class*="custom-select-wrapper"])
 */
select:invalid:not([class*="custom-select-wrapper"]) {
    color: gray;
    font-size: 0.675rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    height: 2.5rem;
}

/**
 * Sector Select Styles
 * Applies specific styles for select elements whose IDs start with "sector" in an invalid state.
 * 
 * @access public
 * @selector select[id^="sector"]:invalid
 */
select[id^="sector"]:invalid {
    color: gray;
    font-size: 0.675rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    height: 2.5rem;
}

/**
 * Select Option Styles
 * Ensures consistent font styling for options in select elements.
 * 
 * @access public
 */
select option {
    color: black;
    font-size: 1rem;
}

/**
 * Placeholder Styles for Inputs
 * Sets font size for placeholders across multiple browsers.
 * For some reason, each placeholder has to be explicitly declared.
 * 
 * @access public
 */
 input::-webkit-input-placeholder {
    font-size: 12px !important;
}

input::-moz-placeholder {
    font-size: 12px !important;
}

input:-ms-input-placeholder {
    font-size: 12px !important;
}

input::placeholder {
    font-size: 12px !important;
}

/**
 * Custom Select Wrapper
 * Styles for a custom select wrapper to handle custom dropdown appearance.
 * 
 * @access public
 */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/**
 * Select Element Inside Custom Select
 * Overrides default appearance and applies custom styling for select elements within the custom wrapper.
 * 
 * @access public
 */
.custom-select-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    padding: 8px 12px;
    padding-right: 36px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

/**
 * Custom Select Dropdown Arrow
 * Adds a dropdown arrow to custom select wrappers.
 * 
 * @access public
 */
.custom-select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8rem;
    color: gray;
}

/**
 * Date Input Styling
 * Adds a consistent appearance for date inputs.
 * 
 * @access public
 */
input[type="date"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding-left: 6px;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    height: 2.5rem;
}

/**
 * Custom Background for Date Inputs on Touch Devices
 * Adds a calendar icon for date inputs on supported devices.
 * 
 * @access public
 */
@supports (-webkit-touch-callout: none) {
    input[type="date"] {
        background: url('/images/calendar.svg') no-repeat;
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 50px;
    }
}

/**
 * Generic Select Styles
 * Applies base styling for select elements.
 * 
 * @access public
 */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
}

/**
 * Validation Feedback Styles
 * Positions and styles validation feedback messages.
 * 
 * @access public
 */
.validation-feedback {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/**
 * Error and Valid Styles for Inputs and Selects
 * Differentiates between error and valid states for inputs and selects.
 * 
 * @access public
 */
input.error, select.error {
    border-color: #EF4444;
}

input.valid, select.valid {
    border-color: #10B981;
}

/**
 * Currency Table Cell Padding Override
 * Reduces padding from 0.25rem to 0.1rem to fix phantom padding issue in currency table
 * 
 * @access public
 */
.currency-table td,
.currency-table th {
    padding: 0.20rem !important;
}

/**
 * Checkbox Styling
 * Custom styling for checkboxes to match the footer purple color (fuchsia-800)
 * 
 * @access public
 */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 2rem;
    height: 2rem;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
}

input[type="checkbox"]:hover {
    border-color: #9ca3af;
}

input[type="checkbox"]:checked {
    background-color: rgba(134, 25, 143, 1);
    border-color: rgba(134, 25, 143, 1);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    font-weight: bold;
}

/**
 * Utility Classes
 * Reusable utility classes for hidden elements, fixed positioning, flexbox layout, etc.
 * 
 * @access public
 */
.hidden {
    display: none;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.max-w-sm {
    max-width: 24rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}
