/* Estilos para o módulo Select Probes com AlpineJS e Bootstrap */

/* Modal customizado */
.probe-selection-modal {
    font-family: 'Roboto', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
}

.probe-selection-modal .modal-dialog {
    max-width: 90%;
}

.probe-selection-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Search bar */
.probe-selection-modal .input-group .form-control {
    border-radius: 0.375rem 0 0 0.375rem;
}

.probe-selection-modal .input-group .btn {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Selection summary */
.probe-selection-modal .badge {
    font-size: 0.875rem;
}

/* Accordion customization */
.probe-selection-modal .accordion-button {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.probe-selection-modal .accordion-button:not(.collapsed) {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary-border-subtle);
}

.probe-selection-modal .accordion-body {
    padding: 1rem;
}

/* Probe cards */
.probe-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.probe-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transform: translateY(-1px);
}

.probe-card.border-primary {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

.probe-card.border-warning {
    border-left: 4px solid var(--bs-warning);
}

.probe-card .card-body {
    padding: 0.75rem;
}

.probe-card .form-check {
    margin-bottom: 0;
}

.probe-card .form-check-input {
    margin-top: 0.125rem;
}

.probe-card .form-check-label {
    cursor: pointer;
    width: 100%;
}

/* Probe info styling */
.probe-card .fw-bold {
    font-size: 0.875rem;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.probe-card .text-muted {
    font-size: 0.75rem;
    line-height: 1.2;
}

.probe-card .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
}

/* Logo styling */
.probe-card img {
    border-radius: 0.25rem;
    object-fit: contain;
}

/* Region headers */
.probe-selection-modal h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.probe-selection-modal .border-bottom {
    border-color: var(--bs-border-color) !important;
}

/* Control buttons */
.probe-selection-modal .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.probe-selection-modal .btn-outline-primary:hover,
.probe-selection-modal .btn-outline-secondary:hover {
    transform: none;
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .probe-selection-modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .probe-selection-modal .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    .probe-selection-modal .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .probe-card {
        background-color: var(--bs-dark);
        border-color: var(--bs-gray-700);
        color: var(--bs-light);
    }
    
    .probe-card:hover {
        border-color: var(--bs-primary);
    }
}

/* Animation for Alpine.js transitions */
[x-cloak] {
    display: none !important;
}

.probe-selection-modal[x-show] {
    transition: opacity 150ms ease-out;
}

.probe-selection-modal[x-show].show {
    opacity: 1;
}

.probe-selection-modal[x-show]:not(.show) {
    opacity: 0;
}

/* Focus states for accessibility */
.probe-card:focus-within {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.probe-selection-modal .btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Utility classes */
.probe-selection-modal .text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.probe-selection-modal .small {
    font-size: 0.875rem;
}

.probe-selection-modal .fw-semibold {
    font-weight: 600;
}
