/* Input Modal Component Styles */
/* Borrows responsive patterns and animations from select_modal */

.input-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    padding: 20px;
    box-sizing: border-box;
}

.input-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.input-modal {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.input-modal.animate-slide-in {
    animation: slide-in 0.2s ease-out;
}

.input-modal-overlay.animate-fade-in {
    animation: fade-in 0.25s ease-out;
}

@keyframes slide-in {
    from {
        top: 51%;
    }
    to {
        top: 50%;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.input-modal-content {
    padding: 24px;
}

/* Header Styles */
.input-modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.input-modal-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--blue-midnight, #01232C);
    line-height: 1.3;
}

/* Form Styles */
.input-modal-form {
    margin-bottom: 20px;
}

.input-modal-field {
    margin-bottom: 16px;
}

.input-modal-field:last-child {
    margin-bottom: 0;
}

.input-modal-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-600, #4E4E4E);
}

/* Input Styles */
.input-modal-input,
.input-modal-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--grey-300, #E1E5E5);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Spline Sans', sans-serif;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.input-modal-input:focus,
.input-modal-textarea:focus {
    outline: none;
    border-color: var(--brand-green, #00C57B);
    box-shadow: 0 0 0 3px rgba(0, 197, 123, 0.1);
}

.input-modal-input::placeholder,
.input-modal-textarea::placeholder {
    color: var(--grey-500, #949899);
}

.input-modal-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom Select Styles */
.input-modal-select {
    position: relative;
    width: 100%;
}

.input-modal-select-trigger {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--grey-300, #E1E5E5);
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.input-modal-select-trigger:hover {
    border-color: var(--grey-400, #C6CBCC);
}

.input-modal-select-trigger.open,
.input-modal-select-trigger.selected {
    border-color: var(--brand-green, #00C57B);
    box-shadow: 0 0 0 3px rgba(0, 197, 123, 0.1);
}

.input-modal-select-text {
    font-size: 16px;
    color: var(--blue-midnight, #01232C);
}

.input-modal-select-trigger:not(.selected) .input-modal-select-text {
    color: var(--grey-500, #949899);
}

.input-modal-select-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--grey-500, #949899);
    transition: transform 0.2s ease;
}

.input-modal-select-trigger.open .input-modal-select-arrow {
    transform: rotate(180deg);
}

.input-modal-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--grey-300, #E1E5E5);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.input-modal-select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.input-modal-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.input-modal-select-option:hover {
    background-color: var(--grey-100, #F8F9FA);
}

.input-modal-select-option:first-child {
    border-radius: 8px 8px 0 0;
}

.input-modal-select-option:last-child {
    border-radius: 0 0 8px 8px;
}

/* Multi-Select Styles */
.input-modal-multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.input-modal-option-button {
    display: inline-block;
}

.input-modal-option-btn {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--grey-300, #E1E5E5);
    font-size: 14px;
    font-weight: 500;
    color: var(--blue-midnight, #01232C);
    background-color: var(--grey-100, #F8F9FA);
    transition: all 0.2s ease;
    font-family: 'Spline Sans', sans-serif;
}

.input-modal-option-btn:hover {
    border-color: var(--brand-green, #00C57B);
    background-color: var(--extra-light-green, #F0FDF7);
}

.input-modal-option-btn.selected {
    border-color: var(--brand-green, #00C57B);
    background-color: var(--brand-green, #00C57B);
    color: white;
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(0, 197, 123, 0.2);
}

/* Action Buttons */
.input-modal-actions {
    margin: 0;
    width: 100%;
    background: white;
    box-sizing: border-box;
}

.input-modal-button {
    /* inherits from button */
    margin: 0 0 8px 0;
    width: 100%;
}

.input-modal-cancel {
    border: 1px var(--red-danger, #FF1F1F) solid;
    color: var(--red-danger, #FF1F1F);
    background: white;
}

.input-modal-cancel:active {
    background: var(--grey-400, #C6CBCC);
    color: var(--grey-500, #949899);
    border-color: var(--grey-500, #949899);
}

.input-modal-submit {
    background: var(--brand-green, #00C57B);
    color: white;
}

.input-modal-submit:active {
    background: var(--dark-green, #009960);
}

.input-modal-submit:disabled {
    background: var(--grey-300, #E1E5E5);
    color: var(--grey-500, #949899);
    cursor: not-allowed;
}

/* Mobile Responsive */
@media only screen and (max-width: 767px) {
    .input-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .input-modal {
        max-width: 100%;
        width: 100%;
        max-height: 80vh;
        top: unset;
        bottom: 0;
        left: 0;
        transform: none;
        border-radius: 16px 16px 0 0;
    }
    
    @keyframes slide-in {
        from {
            bottom: -10%;
        }
        to {
            bottom: 0;
        }
    }
    
    .input-modal-content {
        padding: 20px;
    }
    
    .input-modal-title {
        font-size: 18px;
    }
    
    .input-modal-input,
    .input-modal-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Multi-select buttons stack better on mobile */
    .input-modal-multi-select,
    .input-modal-radio-select {
        gap: 6px;
    }
    
    .input-modal-option-btn {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Small mobile adjustments */
@media only screen and (max-width: 480px) {
    .input-modal-content {
        padding: 16px;
    }
    
    .input-modal-field {
        margin-bottom: 12px;
    }
}

/* Focus ring for accessibility */
.input-modal-button:focus,
.input-modal-input:focus,
.input-modal-textarea:focus,
.input-modal-select-trigger:focus,
.input-modal-option-btn:focus {
    outline: 2px solid var(--brand-green, #00C57B);
    outline-offset: 2px;
}

/* Scrollbar styling for options */
.input-modal-select-options::-webkit-scrollbar {
    width: 6px;
}

.input-modal-select-options::-webkit-scrollbar-track {
    background: var(--grey-200, #EDF1F2);
    border-radius: 3px;
}

.input-modal-select-options::-webkit-scrollbar-thumb {
    background: var(--grey-400, #C6CBCC);
    border-radius: 3px;
}

.input-modal-select-options::-webkit-scrollbar-thumb:hover {
    background: var(--grey-500, #949899);
}

/* Radio Select Styles (like multi-select but mutually exclusive) */
.input-modal-radio-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
} 