/**
 * Custom Select Styles
 * Estilos para o dropdown personalizado
 */

.cg-custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 200px;
    margin-left: 8px;
    z-index: 10;
}

.cg-custom-trigger {
    padding: 12px 40px 12px 16px;
    border: 2px solid #699824;
    border-radius: 25px;
    font-size: 16px;
    background: #ffffff;
    color: #08203C;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
}

.cg-custom-trigger:hover {
    border-color: #6A9926;
    background: #f8fdf4;
}

.cg-arrow {
    font-size: 12px;
    color: #08203C;
    transition: transform 0.2s ease;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.cg-custom-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 999999;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.cg-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    color: #08203C;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    border-bottom: 1px solid #f0f0f0;
}

.cg-dropdown-item:last-child {
    border-bottom: none;
}

.cg-dropdown-item:hover,
.cg-dropdown-item.selected {
    background: #6A9926 !important;
    color: #ffffff !important;
}

.cg-dropdown-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.cg-dropdown-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Animação da seta */
.cg-custom-select-wrapper.open .cg-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Garante z-index máximo quando aberto */
.cg-custom-select-wrapper.open {
    z-index: 999998;
}

.cg-custom-select-wrapper.open .cg-custom-dropdown {
    z-index: 999999;
    top: calc(100% + 8px) !important;
    bottom: auto !important;
    transform: none !important;
}

/* Responsivo */
@media (max-width: 768px) {
    .cg-custom-select-wrapper {
        min-width: 150px;
        margin-left: 5px;
    }
    
    .cg-custom-trigger {
        padding: 10px 35px 10px 14px;
        font-size: 14px;
    }
    
    .cg-dropdown-item {
        padding: 10px 14px;
        font-size: 14px;
    }
}