/* Custom CSS for Berry Theme - Select Box Fixes */

/* Increase max-width for all employee pages content */
.max-w-7xl {
    max-width: 90rem !important;
}

/* Berry Theme Select Box Styling - STANDARDIZED DESIGN */
.berry-theme select,
.berry-theme .form-select,
select.form-control,
select.custom-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem; /* Standardized border radius */
    padding: 0.5rem 2.5rem 0.5rem 0.75rem; /* Standardized padding */
    font-size: 0.875rem; /* Standardized font size */
    line-height: 1.25rem;
    font-weight: 500;
    color: #1e293b;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364785b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center; /* Standardized position */
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em; /* Standardized size */
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    width: 100%;
    /* Remove shadows for consistency */
    box-shadow: none !important;
}

.berry-theme select:hover,
.berry-theme .form-select:hover,
select.form-control:hover,
select.custom-select:hover {
    border-color: #cbd5e1;
    /* background-color: #f8fafc; REMOVED */
    /* Remove shadows for consistency */
    box-shadow: none !important;
}

.berry-theme select:focus,
.berry-theme .form-select:focus,
select.form-control:focus,
select.custom-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: white;
}

/* Dark mode support for Berry theme */
.dark .berry-theme select,
.dark .berry-theme .form-select,
.dark select.form-control,
.dark select.custom-select {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}

.dark .berry-theme select:hover,
.dark .berry-theme .form-select:hover,
.dark select.form-control:hover,
.dark select.custom-select:hover {
    border-color: #475569;
    /* background-color: #334155; REMOVED */
    /* Remove shadows for consistency */
    box-shadow: none !important;
}

.dark .berry-theme select:focus,
.dark .berry-theme .form-select:focus,
.dark select.form-control:focus,
.dark select.custom-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    background-color: #1e293b;
}

/* Form group styling for Berry theme */
.berry-theme .form-group,
.berry-theme .mb-3 {
    margin-bottom: 1.5rem;
}

.berry-theme .form-label,
.berry-theme label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.dark .berry-theme .form-label,
.dark .berry-theme label {
    color: #cbd5e1;
}

/* Multiple select styling for Berry theme */
.berry-theme select[multiple],
select.form-control[multiple],
select.custom-select[multiple] {
    min-height: 120px;
    padding: 0.75rem;
    background-image: none;
    border-radius: 0.75rem;
}

.berry-theme select[multiple] option,
select.form-control[multiple] option,
select.custom-select[multiple] option {
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 0.375rem;
    background-color: #f8fafc;
}

.dark .berry-theme select[multiple] option,
.dark select.form-control[multiple] option,
.dark select.custom-select[multiple] option {
    background-color: #334155;
    color: #f1f5f9;
}

/* Disabled state for Berry theme */
.berry-theme select:disabled,
.berry-theme .form-select:disabled,
select.form-control:disabled,
select.custom-select:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.dark .berry-theme select:disabled,
.dark .berry-theme .form-select:disabled,
.dark select.form-control:disabled,
.dark select.custom-select:disabled {
    background-color: #334155;
    color: #64748b;
}

/* Error state for Berry theme */
.berry-theme select.is-invalid,
.berry-theme .form-select.is-invalid,
select.form-control.is-invalid,
select.custom-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success state for Berry theme */
.berry-theme select.is-valid,
.berry-theme .form-select.is-valid,
select.form-control.is-valid,
select.custom-select.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Size variations for Berry theme */
.berry-theme select.form-select-sm,
select.form-control.form-select-sm,
select.custom-select.form-select-sm {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.5rem;
}

.berry-theme select.form-select-lg,
select.form-control.form-select-lg,
select.custom-select.form-select-lg {
    padding: 1rem 2.5rem 1rem 1rem;
    font-size: 1rem;
    border-radius: 1rem;
}

/* Inline forms for Berry theme */
.berry-theme .form-inline select,
.berry-theme .input-group select {
    display: inline-block;
    width: auto;
    margin-right: 0.5rem;
}

/* Input group styling for Berry theme */
.berry-theme .input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.berry-theme .input-group select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.berry-theme .input-group-append select,
.berry-theme .input-group-prepend select {
    border-radius: 0;
}

.berry-theme .input-group-append:last-child select,
.berry-theme .input-group-prepend:first-child select {
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.berry-theme .input-group-append:first-child select,
.berry-theme .input-group-prepend:last-child select {
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

/* Responsive design for Berry theme */
@media (max-width: 640px) {
    .berry-theme select,
    .berry-theme .form-select,
    select.form-control,
    select.custom-select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem 2.5rem 0.75rem 1rem;
    }
    
    .berry-theme select[multiple],
    select.form-control[multiple],
    select.custom-select[multiple] {
        min-height: 100px;
    }
}

/* Card and modal select boxes */
.berry-theme .card select,
.berry-theme .modal select {
    border-color: #e2e8f0;
    background-color: white;
}

.dark .berry-theme .card select,
.dark .berry-theme .modal select {
    border-color: #334155;
    background-color: #1e293b;
}

/* Table inline selects */
.berry-theme .table select,
.berry-theme table select {
    padding: 0.375rem 1.5rem 0.375rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    border-width: 1px;
}

/* Filter and search selects */
.berry-theme .filter-select,
.berry-theme .search-select {
    border-color: #cbd5e1;
    background-color: #f8fafc;
    min-width: 200px;
}

.dark .berry-theme .filter-select,
.dark .berry-theme .search-select {
    border-color: #475569;
    background-color: #334155;
}
